Serializable
, Comparable<ClassFileFormatVersion>
, Constable
public enum ClassFileFormatVersion extends Enum<ClassFileFormatVersion>
Note that additional class file format version constants will be added to model future releases of the Java Virtual Machine Specification.
Enum.EnumDesc<E extends Enum<E>>
Enum Constant | Description |
---|---|
RELEASE_0 |
The original version. |
RELEASE_1 |
The version recognized by the Java Platform 1.1. |
RELEASE_10 |
The version introduced by the Java Platform, Standard Edition 10. |
RELEASE_11 |
The version introduced by the Java Platform, Standard Edition 11. |
RELEASE_12 |
The version introduced by the Java Platform, Standard Edition 12. |
RELEASE_13 |
The version introduced by the Java Platform, Standard Edition 13. |
RELEASE_14 |
The version introduced by the Java Platform, Standard Edition 14. |
RELEASE_15 |
The version introduced by the Java Platform, Standard Edition 15. |
RELEASE_16 |
The version introduced by the Java Platform, Standard Edition 16. |
RELEASE_17 |
The version introduced by the Java Platform, Standard Edition 17. |
RELEASE_18 |
The version introduced by the Java Platform, Standard Edition 18. |
RELEASE_19 |
The version introduced by the Java Platform, Standard Edition 19. |
RELEASE_2 |
The version introduced by the Java 2 Platform, Standard Edition, v 1.2. |
RELEASE_20 |
The version introduced by the Java Platform, Standard Edition 20. |
RELEASE_21 |
The version introduced by the Java Platform, Standard Edition 21. |
RELEASE_3 |
The version introduced by the Java 2 Platform, Standard Edition, v 1.3. |
RELEASE_4 |
The version introduced by the Java 2 Platform, Standard Edition, v 1.4. |
RELEASE_5 |
The version introduced by the Java 2 Platform, Standard Edition 5.0. |
RELEASE_6 |
The version introduced by the Java Platform, Standard Edition 6. |
RELEASE_7 |
The version introduced by the Java Platform, Standard Edition 7. |
RELEASE_8 |
The version introduced by the Java Platform, Standard Edition 8. |
RELEASE_9 |
The version introduced by the Java Platform, Standard Edition 9. |
Modifier and Type | Method | Description |
---|---|---|
static ClassFileFormatVersion |
fromMajor |
Returns the latest class file format version whose major class file version matches the argument. |
static ClassFileFormatVersion |
latest() |
Returns the latest class file format version. |
int |
major() |
Returns the major class file version as an integer. |
Runtime.Version |
runtimeVersion() |
Returns the least runtime version that supports this class file format version; otherwise null . |
static ClassFileFormatVersion |
valueOf |
Returns the latest class file format version that is usable under the runtime version argument. |
static ClassFileFormatVersion |
valueOf |
Returns 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. |
public static final ClassFileFormatVersion RELEASE_0
public static final ClassFileFormatVersion RELEASE_1
RELEASE_0
and RELEASE_1
have the same major version, several additional attributes were defined for RELEASE_1
(JVMS 4.7).public static final ClassFileFormatVersion RELEASE_2
ACC_STRICT
access flag.public static final ClassFileFormatVersion RELEASE_3
public static final ClassFileFormatVersion RELEASE_4
public static final ClassFileFormatVersion RELEASE_5
public static final ClassFileFormatVersion RELEASE_6
public static final ClassFileFormatVersion RELEASE_7
public static final ClassFileFormatVersion RELEASE_8
public static final ClassFileFormatVersion RELEASE_9
public static final ClassFileFormatVersion RELEASE_10
public static final ClassFileFormatVersion RELEASE_11
public static final ClassFileFormatVersion RELEASE_12
public static final ClassFileFormatVersion RELEASE_13
public static final ClassFileFormatVersion RELEASE_14
public static final ClassFileFormatVersion RELEASE_15
public static final ClassFileFormatVersion RELEASE_16
public static final ClassFileFormatVersion RELEASE_17
public static final ClassFileFormatVersion RELEASE_18
public static final ClassFileFormatVersion RELEASE_19
public static final ClassFileFormatVersion RELEASE_20
public static final ClassFileFormatVersion RELEASE_21
public static ClassFileFormatVersion[] values()
public static ClassFileFormatVersion valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is nullpublic static ClassFileFormatVersion latest()
public int major()
ClassFile
Structurepublic static ClassFileFormatVersion valueOf(Runtime.Version rv)
IllegalArgumentException
is 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.
"17"
, to the corresponding class file format version, RELEASE_17
, is: ClassFileFormatVersion.valueOf(Runtime.Version.parse("17"))
rv
- runtime version to map to a class file format versionIllegalArgumentException
- if the feature of version argument is greater than the feature of the platform version.public Runtime.Version runtimeVersion()
null
. 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 to RELEASE_6
have non-null
results.null
public static ClassFileFormatVersion fromMajor(int major)
major
- the major class file version as an integerIllegalArgumentException
- if the argument is outside of the range of major class file versions
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/reflect/ClassFileFormatVersion.html