Top Description Inners Fields Constructors Methods
net.bytebuddy

public Class ClassFileVersion

extends Object
implements Comparable<ClassFileVersion>, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, java.lang.Comparable
Imports
edu.umd.cs.findbugs.annotations.SuppressFBWarnings, net.bytebuddy.build.AccessControllerPlugin, .HashCodeAndEqualsPlugin, net.bytebuddy.description.type.TypeDescription, net.bytebuddy.dynamic.ClassFileLocator, net.bytebuddy.utility.OpenedClassReader, net.bytebuddy.utility.nullability.MaybeNull, net.bytebuddy.jar.asm.Opcodes, java.io.IOException, .Serializable, java.lang.reflect.Method, java.security.PrivilegedAction

A wrapper object for representing a validated class file version in the format that is specified by the JVMS.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static interface
ClassFileVersion.VersionLocator

A locator for the executing VM's Java version.

Field Summary

Modifier and TypeField and Description
protected static final int
BASE_VERSION

Returns the minimal version number that is legal.

public static final ClassFileVersion
JAVA_V1

The class file version of Java 1.

public static final ClassFileVersion
JAVA_V10

The class file version of Java 10.

public static final ClassFileVersion
JAVA_V11

The class file version of Java 11.

public static final ClassFileVersion
JAVA_V12

The class file version of Java 12.

public static final ClassFileVersion
JAVA_V13

The class file version of Java 13.

public static final ClassFileVersion
JAVA_V14

The class file version of Java 14.

public static final ClassFileVersion
JAVA_V15

The class file version of Java 15.

public static final ClassFileVersion
JAVA_V16

The class file version of Java 16.

public static final ClassFileVersion
JAVA_V17

The class file version of Java 17.

public static final ClassFileVersion
JAVA_V18

The class file version of Java 18.

public static final ClassFileVersion
JAVA_V19

The class file version of Java 19.

public static final ClassFileVersion
JAVA_V2

The class file version of Java 2.

public static final ClassFileVersion
JAVA_V20

The class file version of Java 20.

public static final ClassFileVersion
JAVA_V21

The class file version of Java 21.

public static final ClassFileVersion
JAVA_V22

The class file version of Java 22.

public static final ClassFileVersion
JAVA_V23

The class file version of Java 23.

public static final ClassFileVersion
JAVA_V3

The class file version of Java 3.

public static final ClassFileVersion
JAVA_V4

The class file version of Java 4.

public static final ClassFileVersion
JAVA_V5

The class file version of Java 5.

public static final ClassFileVersion
JAVA_V6

The class file version of Java 6.

public static final ClassFileVersion
JAVA_V7

The class file version of Java 7.

public static final ClassFileVersion
JAVA_V8

The class file version of Java 8.

public static final ClassFileVersion
JAVA_V9

The class file version of Java 9.

private static final long
serialVersionUID

The class's serial version UID.

private static final ClassFileVersion.VersionLocator
VERSION_LOCATOR

A version locator for the executing JVM.

private final int
versionNumber

The version number that is represented by this class file version instance.

Constructor Summary

AccessConstructor and Description
protected
ClassFileVersion(int
The minor-major release number.
versionNumber
)

Creates a wrapper for a given minor-major release of the Java class file format.

Method Summary

Modifier and TypeMethod and Description
public ClassFileVersion

Returns:

This class file version but indicating the use of preview features.
asPreviewVersion
()

Returns this class file version indicating a class using preview features.

public int
compareTo(ClassFileVersion
the object to be compared.
other
)

Implements java.lang.Comparable.compareTo.

Compares this object with the specified object for order.
private static <
The type of the action's resolved value.
T
>
T

Returns:

The action's resolved value.
doPrivileged
(PrivilegedAction<T>
The action to execute from a privileged context.
action
)

A proxy for java.security.AccessController#doPrivileged that is activated if available.

public boolean
equals(Object
the reference object with which to compare.
other
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
public int

Returns:

The Java runtime version.
getJavaVersion
()

Returns the Java runtime version number of this class file version.

public short

Returns:

The major version this instance represents.
getMajorVersion
()

Returns the major version this instance represents.

public int

Returns:

The minor-major release number of this class file version.
getMinorMajorVersion
()

Returns the minor-major release number of this class file version.

public short

Returns:

The minor version this instance represents.
getMinorVersion
()

Returns the minor version this instance represents.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
public boolean

Returns:

true if this version is at least of the given version.
isAtLeast
(ClassFileVersion
The version to check against.
classFileVersion
)

Checks if this class file version is at least as new as the provided version.

public boolean

Returns:

true if this version is as most as new as the provided version.
isAtMost
(ClassFileVersion
The version to check against.
classFileVersion
)

Checks if this class file version is at most as new as the provided version.

public boolean

Returns:

true if this version is newer than the provided version.
isGreaterThan
(ClassFileVersion
The version to check against.
classFileVersion
)

Checks if this class file version is newer than the provided version.

public boolean

Returns:

true if this version is older than the provided version.
isLessThan
(ClassFileVersion
The version to check against.
classFileVersion
)

Checks if this class file version is older than the provided version.

public boolean

Returns:

true if this class file version indicates the use of preview features.
isPreviewVersion
()

Returns true if this class file version indicates the use of preview features.

public static ClassFileVersion

Returns:

The latest officially supported Java version.
latest
()

Returns the latest officially supported Java version when experimental support is not enabled.

public static ClassFileVersion

Returns:

The type's class file version.
of
(Class<?>
The type for which to locate a class file version.
type
)

Extracts a class' class version.

public static ClassFileVersion

Returns:

The type's class file version.
of
(Class<?>
The type for which to locate a class file version.
type
,
ClassFileLocator
The class file locator to query for a class file.
classFileLocator
)

Extracts a class' class version.

public static ClassFileVersion

Returns:

The type's class file version.
of
(TypeDescription
The type for which to locate a class file version.
typeDescription
,
ClassFileLocator
The class file locator to query for a class file.
classFileLocator
)

Extracts a class' class version.

public static ClassFileVersion

Returns:

The supplied class file's class file version.
ofClassFile
(byte[]
The class file's binary representation.
binaryRepresentation
)

Extracts a class' class version from a class file.

public static ClassFileVersion

Returns:

A wrapper for the given Java class file version.
ofJavaVersion
(int
The Java version.
javaVersion
)

Creates a class file version for a given major release of Java.

public static ClassFileVersion

Returns:

The appropriate class file version.
ofJavaVersionString
(String
The Java version string.
javaVersionString
)

Returns the Java class file by its representation by a version string in accordance to the formats known to javac.

public static ClassFileVersion

Returns:

A representation of the version number.
ofMinorMajor
(int
The minor-major release number.
versionNumber
)

Creates a wrapper for a given minor-major release of the Java class file format.

public static ClassFileVersion

Returns:

The currently running Java process's class file version.
ofThisVm
()

Finds the highest class file version that is compatible to the current JVM version.

public static ClassFileVersion

Returns:

The currently running Java process's class file version or the fallback if locating this version is impossible.
ofThisVm
(ClassFileVersion
The version to fallback to if locating a class file version is not possible.
fallback
)

Finds the highest class file version that is compatible to the current JVM version.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

BASE_VERSIONback to summary
protected static final int BASE_VERSION

Returns the minimal version number that is legal.

JAVA_V1back to summary
public static final ClassFileVersion JAVA_V1

The class file version of Java 1.

JAVA_V10back to summary
public static final ClassFileVersion JAVA_V10

The class file version of Java 10.

JAVA_V11back to summary
public static final ClassFileVersion JAVA_V11

The class file version of Java 11.

JAVA_V12back to summary
public static final ClassFileVersion JAVA_V12

The class file version of Java 12.

JAVA_V13back to summary
public static final ClassFileVersion JAVA_V13

The class file version of Java 13.

JAVA_V14back to summary
public static final ClassFileVersion JAVA_V14

The class file version of Java 14.

JAVA_V15back to summary
public static final ClassFileVersion JAVA_V15

The class file version of Java 15.

JAVA_V16back to summary
public static final ClassFileVersion JAVA_V16

The class file version of Java 16.

JAVA_V17back to summary
public static final ClassFileVersion JAVA_V17

The class file version of Java 17.

JAVA_V18back to summary
public static final ClassFileVersion JAVA_V18

The class file version of Java 18.

JAVA_V19back to summary
public static final ClassFileVersion JAVA_V19

The class file version of Java 19.

JAVA_V2back to summary
public static final ClassFileVersion JAVA_V2

The class file version of Java 2.

JAVA_V20back to summary
public static final ClassFileVersion JAVA_V20

The class file version of Java 20.

JAVA_V21back to summary
public static final ClassFileVersion JAVA_V21

The class file version of Java 21.

JAVA_V22back to summary
public static final ClassFileVersion JAVA_V22

The class file version of Java 22.

JAVA_V23back to summary
public static final ClassFileVersion JAVA_V23

The class file version of Java 23.

JAVA_V3back to summary
public static final ClassFileVersion JAVA_V3

The class file version of Java 3.

JAVA_V4back to summary
public static final ClassFileVersion JAVA_V4

The class file version of Java 4.

JAVA_V5back to summary
public static final ClassFileVersion JAVA_V5

The class file version of Java 5.

JAVA_V6back to summary
public static final ClassFileVersion JAVA_V6

The class file version of Java 6.

JAVA_V7back to summary
public static final ClassFileVersion JAVA_V7

The class file version of Java 7.

JAVA_V8back to summary
public static final ClassFileVersion JAVA_V8

The class file version of Java 8.

JAVA_V9back to summary
public static final ClassFileVersion JAVA_V9

The class file version of Java 9.

serialVersionUIDback to summary
private static final long serialVersionUID

The class's serial version UID.

VERSION_LOCATORback to summary
private static final ClassFileVersion.VersionLocator VERSION_LOCATOR

A version locator for the executing JVM.

versionNumberback to summary
private final int versionNumber

The version number that is represented by this class file version instance.

Constructor Detail

ClassFileVersionback to summary
protected ClassFileVersion(int versionNumber)

Creates a wrapper for a given minor-major release of the Java class file format.

Parameters
versionNumber:int

The minor-major release number.

Method Detail

asPreviewVersionback to summary
public ClassFileVersion asPreviewVersion()

Returns this class file version indicating a class using preview features.

Returns:ClassFileVersion

This class file version but indicating the use of preview features.

compareToback to summary
public int compareTo(ClassFileVersion other)

Implements java.lang.Comparable.compareTo.

Doc from java.lang.Comparable.compareTo.

Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

The implementor must ensure signum(x.compareTo(y)) == -signum(y.compareTo(x)) for all x and y. (This implies that x.compareTo(y) must throw an exception if and only if y.compareTo(x) throws an exception.)

The implementor must also ensure that the relation is transitive: (x.compareTo(y) > 0 && y.compareTo(z) > 0) implies x.compareTo(z) > 0.

Finally, the implementor must ensure that x.compareTo(y)==0 implies that signum(x.compareTo(z)) == signum(y.compareTo(z)), for all z.

Parameters
other:ClassFileVersion

the object to be compared.

Returns:int

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

doPrivilegedback to summary
private static <T> T doPrivileged(PrivilegedAction<T> action)

A proxy for java.security.AccessController#doPrivileged that is activated if available.

Parameters
<T>
The type of the action's resolved value.
action:PrivilegedAction<T>

The action to execute from a privileged context.

Returns:T

The action's resolved value.

Annotations
@Enhance
equalsback to summary
public boolean equals(Object other)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
other:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getJavaVersionback to summary
public int getJavaVersion()

Returns the Java runtime version number of this class file version.

Returns:int

The Java runtime version.

getMajorVersionback to summary
public short getMajorVersion()

Returns the major version this instance represents.

Returns:short

The major version this instance represents.

getMinorMajorVersionback to summary
public int getMinorMajorVersion()

Returns the minor-major release number of this class file version.

Returns:int

The minor-major release number of this class file version.

getMinorVersionback to summary
public short getMinorVersion()

Returns the minor version this instance represents.

Returns:short

The minor version this instance represents.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object.

Annotations
@Override
isAtLeastback to summary
public boolean isAtLeast(ClassFileVersion classFileVersion)

Checks if this class file version is at least as new as the provided version.

Parameters
classFileVersion:ClassFileVersion

The version to check against.

Returns:boolean

true if this version is at least of the given version.

isAtMostback to summary
public boolean isAtMost(ClassFileVersion classFileVersion)

Checks if this class file version is at most as new as the provided version.

Parameters
classFileVersion:ClassFileVersion

The version to check against.

Returns:boolean

true if this version is as most as new as the provided version.

isGreaterThanback to summary
public boolean isGreaterThan(ClassFileVersion classFileVersion)

Checks if this class file version is newer than the provided version.

Parameters
classFileVersion:ClassFileVersion

The version to check against.

Returns:boolean

true if this version is newer than the provided version.

isLessThanback to summary
public boolean isLessThan(ClassFileVersion classFileVersion)

Checks if this class file version is older than the provided version.

Parameters
classFileVersion:ClassFileVersion

The version to check against.

Returns:boolean

true if this version is older than the provided version.

isPreviewVersionback to summary
public boolean isPreviewVersion()

Returns true if this class file version indicates the use of preview features.

Returns:boolean

true if this class file version indicates the use of preview features.

latestback to summary
public static ClassFileVersion latest()

Returns the latest officially supported Java version when experimental support is not enabled.

Returns:ClassFileVersion

The latest officially supported Java version.

ofback to summary
public static ClassFileVersion of(Class<?> type) throws IOException

Extracts a class' class version. The class' byte code is located by querying the ClassLoader of the class.

Parameters
type:Class<?>

The type for which to locate a class file version.

Returns:ClassFileVersion

The type's class file version.

Exceptions
IOException:
If an error occurs while reading the class file.
ofback to summary
public static ClassFileVersion of(Class<?> type, ClassFileLocator classFileLocator) throws IOException

Extracts a class' class version.

Parameters
type:Class<?>

The type for which to locate a class file version.

classFileLocator:ClassFileLocator

The class file locator to query for a class file.

Returns:ClassFileVersion

The type's class file version.

Exceptions
IOException:
If an error occurs while reading the class file.
ofback to summary
public static ClassFileVersion of(TypeDescription typeDescription, ClassFileLocator classFileLocator) throws IOException

Extracts a class' class version.

Parameters
typeDescription:TypeDescription

The type for which to locate a class file version.

classFileLocator:ClassFileLocator

The class file locator to query for a class file.

Returns:ClassFileVersion

The type's class file version.

Exceptions
IOException:
If an error occurs while reading the class file.
ofClassFileback to summary
public static ClassFileVersion ofClassFile(byte[] binaryRepresentation)

Extracts a class' class version from a class file.

Parameters
binaryRepresentation:byte[]

The class file's binary representation.

Returns:ClassFileVersion

The supplied class file's class file version.

ofJavaVersionback to summary
public static ClassFileVersion ofJavaVersion(int javaVersion)

Creates a class file version for a given major release of Java. Currently, all versions reaching from Java 1 to Java 9 are supported.

Parameters
javaVersion:int

The Java version.

Returns:ClassFileVersion

A wrapper for the given Java class file version.

ofJavaVersionStringback to summary
public static ClassFileVersion ofJavaVersionString(String javaVersionString)

Returns the Java class file by its representation by a version string in accordance to the formats known to javac.

Parameters
javaVersionString:String

The Java version string.

Returns:ClassFileVersion

The appropriate class file version.

ofMinorMajorback to summary
public static ClassFileVersion ofMinorMajor(int versionNumber)

Creates a wrapper for a given minor-major release of the Java class file format.

Parameters
versionNumber:int

The minor-major release number.

Returns:ClassFileVersion

A representation of the version number.

ofThisVmback to summary
public static ClassFileVersion ofThisVm()

Finds the highest class file version that is compatible to the current JVM version. Prior to Java 9, this is achieved by parsing the java.version property which is provided by java.lang.System#getProperty(String). If the system property is not available, an IllegalStateException is thrown.

Returns:ClassFileVersion

The currently running Java process's class file version.

ofThisVmback to summary
public static ClassFileVersion ofThisVm(ClassFileVersion fallback)

Finds the highest class file version that is compatible to the current JVM version. Prior to Java 9, this is achieved by parsing the java.version property which is provided by java.lang.System#getProperty(String). If the system property is not available, the fallback version is returned.

Parameters
fallback:ClassFileVersion

The version to fallback to if locating a class file version is not possible.

Returns:ClassFileVersion

The currently running Java process's class file version or the fallback if locating this version is impossible.

Annotations
@SuppressFBWarnings:REC_CATCH_EXCEPTION
justification:Exception should not be rethrown but trigger a fallback.
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
net.bytebuddy back to summary

protected Interface ClassFileVersion.VersionLocator

Known Direct Implementers
net.bytebuddy.ClassFileVersion.VersionLocator.Resolved, net.bytebuddy.ClassFileVersion.VersionLocator.Unresolved

A locator for the executing VM's Java version.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
ClassFileVersion.VersionLocator.Resolved

A version locator for a resolved class file version.

public static enum
ClassFileVersion.VersionLocator.Resolver

A resolver for the current VM's class file version.

public static class
ClassFileVersion.VersionLocator.Unresolved

An unresolved version locator.

Field Summary

Modifier and TypeField and Description
public static final String
EARLY_ACCESS

A suffix that might indicate an early access version of Java.

public static final String
JAVA_VERSION

The property for reading the current VM's Java version.

Method Summary

Modifier and TypeMethod and Description
public ClassFileVersion

Returns:

The current VM's major version number.
resolve
()

Locates the current VM's major version number.

Field Detail

EARLY_ACCESSback to summary
public static final String EARLY_ACCESS

A suffix that might indicate an early access version of Java.

JAVA_VERSIONback to summary
public static final String JAVA_VERSION

The property for reading the current VM's Java version.

Method Detail

resolveback to summary
public ClassFileVersion resolve()

Locates the current VM's major version number.

Returns:ClassFileVersion

The current VM's major version number.

net.bytebuddy back to summary

public Class ClassFileVersion.VersionLocator.Resolved

extends Object
implements VersionLocator
Class Inheritance
All Implemented Interfaces
net.bytebuddy.ClassFileVersion.VersionLocator
Annotations
@Enhance

A version locator for a resolved class file version.

Field Summary

Modifier and TypeField and Description
private final ClassFileVersion
classFileVersion

The resolved class file version.

Constructor Summary

AccessConstructor and Description
protected
Resolved(ClassFileVersion
The resolved class file version.
classFileVersion
)

Creates a new resolved version locator.

Method Summary

Modifier and TypeMethod and Description
public ClassFileVersion
resolve()

Implements net.bytebuddy.ClassFileVersion.VersionLocator.resolve.

Locates the current VM's major version number.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

classFileVersionback to summary
private final ClassFileVersion classFileVersion

The resolved class file version.

Constructor Detail

Resolvedback to summary
protected Resolved(ClassFileVersion classFileVersion)

Creates a new resolved version locator.

Parameters
classFileVersion:ClassFileVersion

The resolved class file version.

Method Detail

resolveback to summary
public ClassFileVersion resolve()

Implements net.bytebuddy.ClassFileVersion.VersionLocator.resolve.

Doc from net.bytebuddy.ClassFileVersion.VersionLocator.resolve.

Locates the current VM's major version number.

Returns:ClassFileVersion

The current VM's major version number.

net.bytebuddy back to summary

public final Enum ClassFileVersion.VersionLocator.Resolver

extends Enum<ClassFileVersion.VersionLocator.Resolver>
implements PrivilegedAction<ClassFileVersion.VersionLocator>
Class Inheritance
All Implemented Interfaces
java.security.PrivilegedAction

A resolver for the current VM's class file version.

Field Summary

Modifier and TypeField and Description
public static final ClassFileVersion.VersionLocator.Resolver
INSTANCE

The singleton instance.

Constructor Summary

AccessConstructor and Description
private

Field Detail

INSTANCEback to summary
public static final ClassFileVersion.VersionLocator.Resolver INSTANCE

The singleton instance.

Constructor Detail

Resolverback to summary
private Resolver()

Method Detail

runback to summary
public ClassFileVersion.VersionLocator run()

Implements java.security.PrivilegedAction.run.

Doc from java.security.PrivilegedAction.run.

Performs the computation. This method will be called by AccessController.doPrivileged after enabling privileges.

Returns:ClassFileVersion.VersionLocator

a class-dependent value that may represent the results of the computation. Each class that implements PrivilegedAction should document what (if anything) this value represents.

Annotations
@SuppressFBWarnings:REC_CATCH_EXCEPTION
justification:Exception should not be rethrown but trigger a fallback.
valueOfback to summary
public static ClassFileVersion.VersionLocator.Resolver valueOf(String name)
valuesback to summary
public static ClassFileVersion.VersionLocator.Resolver[] values()
net.bytebuddy back to summary

public Class ClassFileVersion.VersionLocator.Unresolved

extends Object
implements VersionLocator
Class Inheritance
All Implemented Interfaces
net.bytebuddy.ClassFileVersion.VersionLocator
Annotations
@Enhance

An unresolved version locator.

Field Summary

Modifier and TypeField and Description
private final String
message

The message of the exception that explains the resolution error.

Constructor Summary

AccessConstructor and Description
protected
Unresolved(String
The message of the exception that explains the resolution error.
message
)

Creates an unresolved version locator.

Method Summary

Modifier and TypeMethod and Description
public ClassFileVersion
resolve()

Implements net.bytebuddy.ClassFileVersion.VersionLocator.resolve.

Locates the current VM's major version number.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

messageback to summary
private final String message

The message of the exception that explains the resolution error.

Constructor Detail

Unresolvedback to summary
protected Unresolved(String message)

Creates an unresolved version locator.

Parameters
message:String

The message of the exception that explains the resolution error.

Method Detail

resolveback to summary
public ClassFileVersion resolve()

Implements net.bytebuddy.ClassFileVersion.VersionLocator.resolve.

Doc from net.bytebuddy.ClassFileVersion.VersionLocator.resolve.

Locates the current VM's major version number.

Returns:ClassFileVersion

The current VM's major version number.