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:
java.security.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 java.security.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 Modifier and Type Field Description private java.lang.reflect.Constructor<?>methodInfoA reference to thejava.lang.invoke.MethodInfoconstructor.-
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 protectedForJava7CapableVm(java.lang.reflect.Method publicLookup, java.lang.reflect.Method getName, java.lang.reflect.Method getDeclaringClass, java.lang.reflect.Method getReferenceKind, java.lang.reflect.Method getMethodType, java.lang.reflect.Method returnType, java.lang.reflect.Method parameterArray, java.lang.reflect.Method lookupClass, java.lang.reflect.Constructor<?> methodInfo)Creates a dispatcher for an intermediate VM.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JavaConstant.MethodHandle.Dispatcherinitialize()Initializes the dispatcher, if required.java.lang.Objectreveal(java.lang.Object lookup, java.lang.Object methodHandle)Reveals a method handle's information object.JavaConstant.MethodHandle.Dispatcherrun()-
Methods inherited from class net.bytebuddy.utility.JavaConstant.MethodHandle.Dispatcher.AbstractBase
getDeclaringClass, getMethodType, getName, getReferenceKind, lookupType, parameterArray, publicLookup, returnType
-
-
-
-
Constructor Detail
-
ForJava7CapableVm
protected ForJava7CapableVm(java.lang.reflect.Method publicLookup, java.lang.reflect.Method getName, java.lang.reflect.Method getDeclaringClass, java.lang.reflect.Method getReferenceKind, java.lang.reflect.Method getMethodType, java.lang.reflect.Method returnType, java.lang.reflect.Method parameterArray, java.lang.reflect.Method lookupClass, java.lang.reflect.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#lookupClassmethod.methodInfo- A reference to thejava.lang.invoke.MethodInfoconstructor.
-
-
Method Detail
-
initialize
public JavaConstant.MethodHandle.Dispatcher initialize()
Initializes the dispatcher, if required.- Specified by:
initializein interfaceJavaConstant.MethodHandle.Dispatcher.Initializable- Returns:
- The initialized dispatcher.
-
run
public JavaConstant.MethodHandle.Dispatcher run()
- Specified by:
runin interfacejava.security.PrivilegedAction<JavaConstant.MethodHandle.Dispatcher>
-
reveal
public java.lang.Object reveal(java.lang.Object lookup, java.lang.Object methodHandle)Reveals a method handle's information object.- Specified by:
revealin 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.MethodHandleInfoobject that describes the instance.
-
-