Enum Class ClassFileFormatVersion
- All Implemented Interfaces:
- Serializable,- Comparable<ClassFileFormatVersion>,- Constable
Class file format versions of the Java virtual machine.
 See the appropriate edition of The Java Virtual Machine
 Specification for information about a particular class file
 format version.
 
Note that additional class file format version constants will be added to model future releases of the Java Virtual Machine Specification.
- API Note:
- The complete version used in a class file includes a major version and a minor version; this enum only models the major version. A Java virtual machine implementation is required to support a range of major versions; see the corresponding edition of the The Java Virtual Machine Specification for details.
- Since:
- 20
- See Also:
- 
Nested Class SummaryNested classes/interfaces declared in class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionThe original version.The version recognized 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 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 SummaryModifier and TypeMethodDescriptionstatic ClassFileFormatVersionfromMajor(int major) Returns the latest class file format version whose major class file version matches the argument.static ClassFileFormatVersionlatest()Returns the latest class file format version.intmajor()Returns the major class file version as an integer.Returns the least runtime version that supports this class file format version; otherwisenull.static ClassFileFormatVersionReturns the latest class file format version that is usable under the runtime version argument.static ClassFileFormatVersionReturns the enum constant of this class with the specified name.static ClassFileFormatVersion[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
RELEASE_0The original version. The format described in The Java Virtual Specification, First Edition.
- 
RELEASE_1The version recognized by the Java Platform 1.1.- API Note:
- While RELEASE_0andRELEASE_1have the same major version, several additional attributes were defined forRELEASE_1(JVMS 4.7).
 
- 
RELEASE_2The version introduced by the Java 2 Platform, Standard Edition, v 1.2. The format described in The Java Virtual Machine Specification, Second Edition, which includes theACC_STRICTaccess flag.
- 
RELEASE_3The version introduced by the Java 2 Platform, Standard Edition, v 1.3.
- 
RELEASE_4The version introduced by the Java 2 Platform, Standard Edition, v 1.4.
- 
RELEASE_5The version introduced by the Java 2 Platform, Standard Edition 5.0.- See Also:
 
- 
RELEASE_6The version introduced by the Java Platform, Standard Edition 6.- See Also:
 
- 
RELEASE_7The version introduced by the Java Platform, Standard Edition 7.- See Also:
 
- 
RELEASE_8The version introduced by the Java Platform, Standard Edition 8.- See Also:
 
- 
RELEASE_9The version introduced by the Java Platform, Standard Edition 9.- See Also:
 
- 
RELEASE_10The version introduced by the Java Platform, Standard Edition 10.- See Also:
 
- 
RELEASE_11The version introduced by the Java Platform, Standard Edition 11.- See Also:
 
- 
RELEASE_12The version introduced by the Java Platform, Standard Edition 12.- See Also:
 
- 
RELEASE_13The version introduced by the Java Platform, Standard Edition 13.- See Also:
 
- 
RELEASE_14The version introduced by the Java Platform, Standard Edition 14.- See Also:
 
- 
RELEASE_15The version introduced by the Java Platform, Standard Edition 15.- See Also:
 
- 
RELEASE_16The version introduced by the Java Platform, Standard Edition 16.- See Also:
 
- 
RELEASE_17The version introduced by the Java Platform, Standard Edition 17. Additions in this release include sealed classes and restoration of always-strict floating-point semantics.- See Also:
 
- 
RELEASE_18The version introduced by the Java Platform, Standard Edition 18.- See Also:
 
- 
RELEASE_19The version introduced by the Java Platform, Standard Edition 19.- See Also:
 
- 
RELEASE_20The version introduced by the Java Platform, Standard Edition 20.- See Also:
 
- 
RELEASE_21The version introduced by the Java Platform, Standard Edition 21.- Since:
- 21
- See Also:
 
- 
RELEASE_22The version introduced by the Java Platform, Standard Edition 22.- Since:
- 22
- See Also:
 
- 
RELEASE_23The version introduced by the Java Platform, Standard Edition 23.- Since:
- 23
- See Also:
 
- 
RELEASE_24The version introduced by the Java Platform, Standard Edition 24.- Since:
- 24
- See Also:
 
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
latestReturns the latest class file format version.- Returns:
- the latest class file format version
 
- 
majorpublic int major()Returns the major class file version as an integer.- Returns:
- the major class file version as an integer
- See Java Virtual Machine Specification:
- 
4.1 The ClassFileStructure
 
- 
valueOfReturns the latest class file format version that is usable under the runtime version argument. If the runtime version's feature is greater than the feature of the runtime version of the latest class file format version, anIllegalArgumentExceptionis thrown.Because the class file format versions of the Java platform have so far followed a linear progression, only the feature component of a runtime version is queried to determine the mapping to a class file format version. If that linearity changes in the future, other components of the runtime version may influence the result. - API Note:
- An expression to convert from a string value, for example
 "17", to the corresponding class file format version,RELEASE_17, is:ClassFileFormatVersion.valueOf(Runtime.Version.parse("17"))
- Parameters:
- rv- runtime version to map to a class file format version
- Returns:
- the latest class file format version that is usable under the runtime version argument
- Throws:
- IllegalArgumentException- if the feature of version argument is greater than the feature of the platform version.
 
- 
runtimeVersionReturns the least runtime version that supports this class file format version; otherwisenull. The returned runtime version has a feature large enough to support this class file format version and has no other elements set. Class file format versions greater than or equal toRELEASE_6have non-nullresults.- Returns:
- the least runtime version that supports this class
 file format version; otherwise null
 
- 
fromMajorReturns the latest class file format version whose major class file version matches the argument.- Parameters:
- major- the major class file version as an integer
- Returns:
- the latest class file format version whose major class file version matches the argument
- Throws:
- IllegalArgumentException- if the argument is outside of the range of major class file versions
 
 
-