Package net.bytebuddy.utility
Class JavaConstant.MethodHandle.Dispatcher.ForJava7CapableVm
- java.lang.Object
-
- net.bytebuddy.utility.JavaConstant.MethodHandle.Dispatcher.AbstractBase
-
- net.bytebuddy.utility.JavaConstant.MethodHandle.Dispatcher.ForJava7CapableVm
-
- All Implemented Interfaces:
PrivilegedAction<JavaConstant.MethodHandle.Dispatcher>
,JavaConstant.MethodHandle.Dispatcher
,JavaConstant.MethodHandle.Dispatcher.Initializable
- Enclosing interface:
- JavaConstant.MethodHandle.Dispatcher
@Enhance public static class JavaConstant.MethodHandle.Dispatcher.ForJava7CapableVm extends JavaConstant.MethodHandle.Dispatcher.AbstractBase implements PrivilegedAction<JavaConstant.MethodHandle.Dispatcher>
A dispatcher that extracts the information of a method handle by using private APIs that are available in Java 7+.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.utility.JavaConstant.MethodHandle.Dispatcher
JavaConstant.MethodHandle.Dispatcher.AbstractBase, JavaConstant.MethodHandle.Dispatcher.CreationAction, JavaConstant.MethodHandle.Dispatcher.ForJava7CapableVm, JavaConstant.MethodHandle.Dispatcher.ForJava8CapableVm, JavaConstant.MethodHandle.Dispatcher.ForLegacyVm, JavaConstant.MethodHandle.Dispatcher.Initializable
-
-
Field Summary
-
Fields inherited from class net.bytebuddy.utility.JavaConstant.MethodHandle.Dispatcher.AbstractBase
getDeclaringClass, getMethodType, getName, getReferenceKind, lookupClass, parameterArray, publicLookup, returnType
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForJava7CapableVm(Method publicLookup, Method getName, Method getDeclaringClass, Method getReferenceKind, Method getMethodType, Method returnType, Method parameterArray, Method lookupClass, Constructor<?> methodInfo)
Creates a dispatcher for an intermediate VM.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JavaConstant.MethodHandle.Dispatcher
initialize()
Initializes the dispatcher, if required.Object
reveal(Object lookup, Object methodHandle)
Reveals a method handle's information object.JavaConstant.MethodHandle.Dispatcher
run()
-
Methods inherited from class net.bytebuddy.utility.JavaConstant.MethodHandle.Dispatcher.AbstractBase
getDeclaringClass, getMethodType, getName, getReferenceKind, lookupType, parameterArray, publicLookup, returnType
-
-
-
-
Constructor Detail
-
ForJava7CapableVm
protected ForJava7CapableVm(Method publicLookup, Method getName, Method getDeclaringClass, Method getReferenceKind, Method getMethodType, Method returnType, Method parameterArray, Method lookupClass, Constructor<?> methodInfo)
Creates a dispatcher for an intermediate VM.- Parameters:
publicLookup
- A reference tojava.lang.invoke.MethodHandles#publicLookup
.getName
- A reference tojava.lang.invoke.MethodHandleInfo#getName
.getDeclaringClass
- A reference tojava.lang.invoke.MethodHandleInfo#getDeclaringClass
.getReferenceKind
- A reference tojava.lang.invoke.MethodHandleInfo#getReferenceKind
.getMethodType
- A reference tojava.lang.invoke.MethodHandleInfo#getMethodType
.returnType
- A reference tojava.lang.invoke.MethodType#returnType
.parameterArray
- A reference tojava.lang.invoke.MethodType#parameterArray
.lookupClass
- A reference tojava.lang.invoke.MethodHandles$Lookup#lookupClass
method.methodInfo
- A reference to thejava.lang.invoke.MethodInfo
constructor.
-
-
Method Detail
-
initialize
public JavaConstant.MethodHandle.Dispatcher initialize()
Initializes the dispatcher, if required.- Specified by:
initialize
in interfaceJavaConstant.MethodHandle.Dispatcher.Initializable
- Returns:
- The initialized dispatcher.
-
run
public JavaConstant.MethodHandle.Dispatcher run()
- Specified by:
run
in interfacePrivilegedAction<JavaConstant.MethodHandle.Dispatcher>
-
reveal
public Object reveal(Object lookup, Object methodHandle)
Reveals a method handle's information object.- Specified by:
reveal
in interfaceJavaConstant.MethodHandle.Dispatcher
- Parameters:
lookup
- The lookup to be used for introspecting the instance.methodHandle
- The method handle to be introspected.- Returns:
- The
java.lang.invoke.MethodHandleInfo
object that describes the instance.
-
-