Enum SourceLevel
- All Implemented Interfaces:
Serializable, Comparable<SourceLevel>, java.lang.constant.Constable, Feature<SourceLevel>
Compliance levels which are idiomatically supported by this processor.
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Stringstatic final FeatureType<SourceLevel> Constant to pass toSourceBuilder.feature(FeatureType)to get the currentSourceLevel.private final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontoString()static SourceLevelReturns 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.
-
Enum Constant Details
-
JAVA_8
-
-
Field Details
-
SOURCE_LEVEL
Constant to pass toSourceBuilder.feature(FeatureType)to get the currentSourceLevel. -
humanReadableFormat
-
version
private final int version
-
-
Constructor Details
-
SourceLevel
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
javacArguments
-
toString
- Overrides:
toStringin classEnum<SourceLevel>
-