public enum SourceLevel extends java.lang.Enum<SourceLevel> implements Feature<SourceLevel>
SourceVersion is problematic to use, as the constants themselves will be missing
on compilers that do not support them (e.g. "RELEASE_8" is not available on javac v6 or v7).
Additionally, sourceLevel.javaUtilObjects().isPresent() is far more readable than
sourceVersion.compareTo(SourceLevel.RELEASE_7) >= 0.
| Enum Constant and Description |
|---|
JAVA_8 |
| Modifier and Type | Field and Description |
|---|---|
static FeatureType<SourceLevel> |
SOURCE_LEVEL
Constant to pass to
SourceBuilder.feature(FeatureType) to get the current
SourceLevel. |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
javacArguments() |
java.lang.String |
toString() |
static SourceLevel |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static SourceLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SourceLevel JAVA_8
public static final FeatureType<SourceLevel> SOURCE_LEVEL
SourceBuilder.feature(FeatureType) to get the current
SourceLevel.public static SourceLevel[] values()
for (SourceLevel c : SourceLevel.values()) System.out.println(c);
public static SourceLevel valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic java.util.List<java.lang.String> javacArguments()
public java.lang.String toString()
toString in class java.lang.Enum<SourceLevel>