Enum Class SourceVersion

java.lang.Object
java.lang.Enum<SourceVersion>
javax.lang.model.SourceVersion
All Implemented Interfaces:
Serializable, Comparable<SourceVersion>, Constable

public enum SourceVersion extends Enum<SourceVersion>
Source versions of the Java programming language. See the appropriate edition of The Java Language Specification for information about a particular source version.

Note that additional source version constants will be added to model future releases of the language.

Since:
1.6
See Also:
  • Nested Class Summary

    Nested classes/interfaces declared in class Enum

    Enum.EnumDesc<E>
    Modifier and Type
    Class
    Description
    static final class 
    Enum.EnumDesc<E extends Enum<E>>
    A nominal descriptor for an enum constant.
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The original version.
    The version introduced by the Java Platform 1.1.
    The version introduced by the Java Platform, Standard Edition 10.
    The version introduced by the Java Platform, Standard Edition 11.
    The version introduced by the Java Platform, Standard Edition 12.
    The version introduced by the Java Platform, Standard Edition 13.
    The version introduced by the Java Platform, Standard Edition 14.
    The version introduced by the Java Platform, Standard Edition 15.
    The version introduced by the Java Platform, Standard Edition 16.
    The version introduced by the Java Platform, Standard Edition 17.
    The version introduced by the Java Platform, Standard Edition 18.
    The version introduced by the Java Platform, Standard Edition 19.
    The version introduced by the Java 2 Platform, Standard Edition, v 1.2.
    The version introduced by the Java Platform, Standard Edition 20.
    The version introduced by the Java Platform, Standard Edition 21.
    The version introduced by the Java Platform, Standard Edition 22.
    The version introduced by the Java Platform, Standard Edition 23.
    The version introduced by the Java Platform, Standard Edition 24.
    The version introduced by the Java Platform, Standard Edition 25.
    The version introduced by the Java Platform, Standard Edition 26.
    The version introduced by the Java 2 Platform, Standard Edition, v 1.3.
    The version introduced by the Java 2 Platform, Standard Edition, v 1.4.
    The version introduced by the Java 2 Platform, Standard Edition 5.0.
    The version introduced by the Java Platform, Standard Edition 6.
    The version introduced by the Java Platform, Standard Edition 7.
    The version introduced by the Java Platform, Standard Edition 8.
    The version introduced by the Java Platform, Standard Edition 9.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Returns whether or not name is a syntactically valid identifier (simple name) or keyword in the latest source version.
    static boolean
    Returns whether or not s is a keyword, a boolean literal, or the null literal in the latest source version.
    static boolean
    Returns whether or not s is a keyword, a boolean literal, or the null literal in the given source version.
    static boolean
    Returns whether or not name is a syntactically valid qualified name in the latest source version.
    static boolean
    Returns whether or not name is a syntactically valid qualified name in the given source version.
    Returns the latest source version that can be modeled.
    Returns the latest source version fully supported by the current execution environment.
    Returns the least runtime version that supports this source version; otherwise null.
    Returns the latest source version that is usable under the runtime version argument.
    Returns the enum constant of this class with the specified name.
    static SourceVersion[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods declared in class Enum

    clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
    Modifier and Type
    Method
    Description
    protected final Object
    Throws CloneNotSupportedException.
    final int
    Compares this enum with the specified object for order.
    Returns an enum descriptor EnumDesc for this instance, if one can be constructed, or an empty Optional if one cannot be.
    final boolean
    equals(Object other)
    Returns true if the specified object is equal to this enum constant.
    protected final void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Finalization has been deprecated for removal.
    Returns the Class object corresponding to this enum constant's enum type.
    final int
    Returns a hash code for this enum constant.
    final String
    Returns the name of this enum constant, exactly as declared in its enum declaration.
    final int
    Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).
    Returns the name of this enum constant, as contained in the declaration.
    static <T extends Enum<T>>
    T
    valueOf(Class<T> enumClass, String name)
    Returns the enum constant of the specified enum class with the specified name.

    Methods declared in class Object

    getClass, notify, notifyAll, wait, wait, wait
    Modifier and Type
    Method
    Description
    final Class<?>
    Returns the runtime class of this Object.
    final void
    Wakes up a single thread that is waiting on this object's monitor.
    final void
    Wakes up all threads that are waiting on this object's monitor.
    final void
    Causes the current thread to wait until it is awakened, typically by being notified or interrupted.
    final void
    wait(long timeoutMillis)
    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
    final void
    wait(long timeoutMillis, int nanos)
    Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.