toggle menu
gradle
8.12
API
switch theme
search in API
gradle
/
org.gradle.jvm.toolchain
/
JavaLanguageVersion
Java
Language
Version
API
interface
JavaLanguageVersion
:
Comparable
<
T
>
(
source
)
Represents a Java Language version
Since
6.7
Members
Functions
as
Int
Link copied to clipboard
API
abstract
fun
asInt
(
)
:
Int
Return this version as a number, 14 for Java 14.
can
Compile
Or
Run
Link copied to clipboard
API
abstract
fun
canCompileOrRun
(
otherVersion
:
Int
)
:
Boolean
abstract
fun
canCompileOrRun
(
other
:
JavaLanguageVersion
)
:
Boolean
Indicates if this version can compile or run code based on the passed in language version.
compare
To
Link copied to clipboard
API
abstract
fun
compareTo
(
p
:
T
)
:
Int
current
Link copied to clipboard
API
@
Incubating
open
fun
current
(
)
:
JavaLanguageVersion
Get the current (i.e., the current runtime) Java Language version.
of
Link copied to clipboard
API
open
fun
of
(
version
:
Int
)
:
JavaLanguageVersion
open
fun
of
(
version
:
String
)
:
JavaLanguageVersion
to
String
Link copied to clipboard
API
abstract
fun
toString
(
)
:
String
Return this version as a String, "14" for Java 14.