Enum JavaVersionAdapter.JavaVersion

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<JavaVersionAdapter.JavaVersion>
    Enclosing class:
    JavaVersionAdapter

    public static enum JavaVersionAdapter.JavaVersion
    extends java.lang.Enum<JavaVersionAdapter.JavaVersion>
    An enumeration of Java versions. Before 9: http://www.oracle.com/technetwork/java/javase/versioning-naming-139433.html 9+: http://openjdk.java.net/jeps/223
    • Field Detail

      • FIRST_MAJOR_VERSION_ORDINAL

        private static final int FIRST_MAJOR_VERSION_ORDINAL
        See Also:
        Constant Field Values
      • versionName

        private final java.lang.String versionName
    • Constructor Detail

      • JavaVersion

        private JavaVersion()
    • Method Detail

      • values

        public static JavaVersionAdapter.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 (JavaVersionAdapter.JavaVersion c : JavaVersionAdapter.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 JavaVersionAdapter.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 name
        java.lang.NullPointerException - if the argument is null
      • getMajorVersion

        public java.lang.String getMajorVersion()
      • isJava8

        private boolean isJava8()
      • isJava9Compatible

        public boolean isJava9Compatible()
      • isJava11Compatible

        public boolean isJava11Compatible()