Package org.eclipse.xtext.util
Enum JavaVersion
- java.lang.Object
-
- java.lang.Enum<JavaVersion>
-
- org.eclipse.xtext.util.JavaVersion
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<JavaVersion>
public enum JavaVersion extends java.lang.Enum<JavaVersion>
Enumeration of Java language versions. This is likely to be extended as new versions are released.- Since:
- 2.9
-
-
Enum Constant Summary
Enum Constants Enum Constant Description JAVA10Java 10 language enhancements: local variable type inference (keyword 'var') (10 is favored over 1.10).JAVA11Well, Java 11JAVA17Well, Java 17, next LTS versionJAVA5Java 5 language enhancements: generics, simplified for-loop, autoboxing and unboxing, enums, varargs, static import, annotations.JAVA6Java 6 language enhancements: Override annotations for implemented methods.JAVA7Java 7 language enhancements: extended numeric literals, switch over strings, type inference, try-with-resources, catch multiple exceptions.JAVA8Java 8 language enhancements: lambda expressions, better type inference, more flexible annotations.JAVA9Java 9 language enhancements: mainly modules and a different version scheme (9 is favored over 1.9).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JavaVersionfromBree(java.lang.String bree)static JavaVersionfromQualifier(java.lang.String qualifier)java.util.List<java.lang.String>getAllQualifiers()java.lang.StringgetBree()java.lang.StringgetComplianceLevelArg()java.lang.StringgetLabel()java.lang.StringgetQualifier()booleanisAtLeast(JavaVersion other)longtoJdtClassFileConstant()static JavaVersionvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static JavaVersion[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
JAVA5
public static final JavaVersion JAVA5
Java 5 language enhancements: generics, simplified for-loop, autoboxing and unboxing, enums, varargs, static import, annotations.
-
JAVA6
public static final JavaVersion JAVA6
Java 6 language enhancements: Override annotations for implemented methods.
-
JAVA7
public static final JavaVersion JAVA7
Java 7 language enhancements: extended numeric literals, switch over strings, type inference, try-with-resources, catch multiple exceptions.
-
JAVA8
public static final JavaVersion JAVA8
Java 8 language enhancements: lambda expressions, better type inference, more flexible annotations.
-
JAVA9
public static final JavaVersion JAVA9
Java 9 language enhancements: mainly modules and a different version scheme (9 is favored over 1.9).
-
JAVA10
public static final JavaVersion JAVA10
Java 10 language enhancements: local variable type inference (keyword 'var') (10 is favored over 1.10).
-
JAVA11
public static final JavaVersion JAVA11
Well, Java 11
-
JAVA17
public static final JavaVersion JAVA17
Well, Java 17, next LTS version
-
-
Method Detail
-
values
public static JavaVersion[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JavaVersion c : JavaVersion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JavaVersion valueOf(java.lang.String name)
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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
fromQualifier
public static JavaVersion fromQualifier(java.lang.String qualifier)
-
fromBree
public static JavaVersion fromBree(java.lang.String bree)
-
getComplianceLevelArg
public java.lang.String getComplianceLevelArg()
- Since:
- 2.14
-
getLabel
public java.lang.String getLabel()
-
getAllQualifiers
public java.util.List<java.lang.String> getAllQualifiers()
- Since:
- 2.14
-
getQualifier
public java.lang.String getQualifier()
-
getBree
public java.lang.String getBree()
-
isAtLeast
public boolean isAtLeast(JavaVersion other)
-
toJdtClassFileConstant
public long toJdtClassFileConstant()
- Since:
- 2.14
-
-