Package net.bytebuddy.utility
Class JavaConstant.MethodHandle.Dispatcher.ForJava8CapableVm
- java.lang.Object
-
- net.bytebuddy.utility.JavaConstant.MethodHandle.Dispatcher.AbstractBase
-
- net.bytebuddy.utility.JavaConstant.MethodHandle.Dispatcher.ForJava8CapableVm
-
- All Implemented Interfaces:
JavaConstant.MethodHandle.Dispatcher,JavaConstant.MethodHandle.Dispatcher.Initializable
- Enclosing interface:
- JavaConstant.MethodHandle.Dispatcher
@Enhance public static class JavaConstant.MethodHandle.Dispatcher.ForJava8CapableVm extends JavaConstant.MethodHandle.Dispatcher.AbstractBase
A dispatcher for introspecting ajava.lang.invoke.MethodHandleinstance on a virtual machine that officially supports this introspection, i.e. Java versions 8+.
-
-
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.MethodrevealDirectA reference to thejava.lang.invoke.MethodHandles.Lookup#revealDirectmethod.-
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 protectedForJava8CapableVm(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.Method revealDirect)Creates a dispatcher for a modern 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.-
Methods inherited from class net.bytebuddy.utility.JavaConstant.MethodHandle.Dispatcher.AbstractBase
getDeclaringClass, getMethodType, getName, getReferenceKind, lookupType, parameterArray, publicLookup, returnType
-
-
-
-
Constructor Detail
-
ForJava8CapableVm
protected ForJava8CapableVm(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.Method revealDirect)Creates a dispatcher for a modern 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.revealDirect- A reference to thejava.lang.invoke.MethodHandles.Lookup#revealDirectmethod.
-
-
Method Detail
-
reveal
public java.lang.Object reveal(java.lang.Object lookup, java.lang.Object methodHandle)Reveals a method handle's information object.- 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.
-
initialize
public JavaConstant.MethodHandle.Dispatcher initialize()
Initializes the dispatcher, if required.- Returns:
- The initialized dispatcher.
-
-