Package com.google.turbine.options
Class LanguageVersion
- java.lang.Object
-
- com.google.turbine.options.LanguageVersion
-
public abstract class LanguageVersion extends java.lang.ObjectThe language version being compiled, corresponding to javac's-source,-target, and--releaseflags.
-
-
Constructor Summary
Constructors Constructor Description LanguageVersion()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static LanguageVersioncreateDefault()The default language version.static LanguageVersionfromJavacopts(com.google.common.collect.ImmutableList<java.lang.String> javacopts)Returns the effectiveLanguageVersionfor the given list of javac options.intmajorVersion()The class file major version corresponding to thetarget().abstract java.util.OptionalIntrelease()The release version.abstract intsource()The source version.javax.lang.model.SourceVersionsourceVersion()abstract inttarget()The target version.
-
-
-
Method Detail
-
source
public abstract int source()
The source version.
-
target
public abstract int target()
The target version.
-
release
public abstract java.util.OptionalInt release()
The release version.If set, system APIs will be resolved from the host JDK's ct.sym instead of using the provided
--bootclasspath.
-
majorVersion
public int majorVersion()
The class file major version corresponding to thetarget().
-
sourceVersion
public javax.lang.model.SourceVersion sourceVersion()
-
createDefault
public static LanguageVersion createDefault()
The default language version. Currently Java 8.
-
fromJavacopts
public static LanguageVersion fromJavacopts(com.google.common.collect.ImmutableList<java.lang.String> javacopts)
Returns the effectiveLanguageVersionfor the given list of javac options.
-
-