Package net.bytebuddy
Class ClassFileVersion.VersionLocator.ForJava9CapableVm
- java.lang.Object
-
- net.bytebuddy.ClassFileVersion.VersionLocator.ForJava9CapableVm
-
- All Implemented Interfaces:
ClassFileVersion.VersionLocator
- Enclosing interface:
- ClassFileVersion.VersionLocator
@Enhance public static class ClassFileVersion.VersionLocator.ForJava9CapableVm extends java.lang.Object implements ClassFileVersion.VersionLocator
A version locator for a JVM of at least version 9.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.ClassFileVersion.VersionLocator
ClassFileVersion.VersionLocator.CreationAction, ClassFileVersion.VersionLocator.ForJava9CapableVm, ClassFileVersion.VersionLocator.ForLegacyVm
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.Method
current
Thejava.lang.Runtime#version()
method.private java.lang.reflect.Method
major
Thejava.lang.Runtime.Version#major()
method.private static java.lang.Object
STATIC_METHOD
Indicates that a reflective method call invokes a static method.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForJava9CapableVm(java.lang.reflect.Method current, java.lang.reflect.Method major)
Creates a new version locator for a Java 9 capable VM.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassFileVersion
locate()
Locates the current VM's major version number.
-
-
-
Field Detail
-
STATIC_METHOD
private static final java.lang.Object STATIC_METHOD
Indicates that a reflective method call invokes a static method.
-
current
private final java.lang.reflect.Method current
Thejava.lang.Runtime#version()
method.
-
major
private final java.lang.reflect.Method major
Thejava.lang.Runtime.Version#major()
method.
-
-
Constructor Detail
-
ForJava9CapableVm
protected ForJava9CapableVm(java.lang.reflect.Method current, java.lang.reflect.Method major)
Creates a new version locator for a Java 9 capable VM.- Parameters:
current
- Thejava.lang.Runtime#version()
method.major
- Thejava.lang.Runtime.Version#major()
method.
-
-
Method Detail
-
locate
public ClassFileVersion locate()
Locates the current VM's major version number.- Specified by:
locate
in interfaceClassFileVersion.VersionLocator
- Returns:
- The current VM's major version number.
-
-