Interface ClassFileVersion
- All Superinterfaces:
ClassElementPREVIEW
,ClassFileElementPREVIEW
ClassFileVersion
is a preview API of the Java platform.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models the classfile version information for a class. Delivered as a
ClassElement
PREVIEW when traversing the elements of a ClassModel
PREVIEW.- Since:
- 22
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns the major classfile version.int
Returns the minor classfile version.static ClassFileVersionPREVIEW
of
(int majorVersion, int minorVersion) Returns aClassFileVersion
PREVIEW element.
-
Method Details
-
majorVersion
int majorVersion()Returns the major classfile version.- Returns:
- the major classfile version
-
minorVersion
int minorVersion()Returns the minor classfile version.- Returns:
- the minor classfile version
-
of
Returns aClassFileVersion
PREVIEW element.- Parameters:
majorVersion
- the major classfile versionminorVersion
- the minor classfile version- Returns:
- a
ClassFileVersion
PREVIEW element
-
ClassFileVersion
when preview features are enabled.