Groovy Documentation

org.gradle.api
[Java] Enum JavaVersion

java.lang.Object
  org.gradle.api.JavaVersion

public enum JavaVersion

An enumeration of Java versions.


Method Summary
static JavaVersion current()

Returns the version of the current JVM.

boolean isJava5()

boolean isJava5Compatible()

boolean isJava6()

boolean isJava6Compatible()

boolean isJava7()

boolean isJava7Compatible()

boolean isJava8Compatible()

String toString()

static JavaVersion toVersion(Object value)

Converts the given object into a JavaVersion.

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Method Detail

current

public static JavaVersion current()
Returns the version of the current JVM.
Returns:
The version of the current JVM.


isJava5

public boolean isJava5()


isJava5Compatible

public boolean isJava5Compatible()


isJava6

public boolean isJava6()


isJava6Compatible

public boolean isJava6Compatible()


isJava7

public boolean isJava7()


isJava7Compatible

public boolean isJava7Compatible()


isJava8Compatible

public boolean isJava8Compatible()


toString

@Override
public String toString()


toVersion

public static JavaVersion toVersion(Object value)
Converts the given object into a JavaVersion.
throws:
IllegalArgumentException when the provided value cannot be converted.
Parameters:
value - An object whose toString() value is to be converted. May be null.
Returns:
The version, or null if the provided value is null.


 

Gradle API 1.1