Package net.bytebuddy.utility
Interface JavaConstant.MethodHandle.Dispatcher
-
- All Known Implementing Classes:
JavaConstant.MethodHandle.Dispatcher.AbstractBase,JavaConstant.MethodHandle.Dispatcher.ForJava7CapableVm,JavaConstant.MethodHandle.Dispatcher.ForJava8CapableVm
- Enclosing class:
- JavaConstant.MethodHandle
protected static interface JavaConstant.MethodHandle.DispatcherA dispatcher for analyzing ajava.lang.invoke.MethodHandleinstance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classJavaConstant.MethodHandle.Dispatcher.AbstractBaseAn abstract base implementation of a dispatcher.static classJavaConstant.MethodHandle.Dispatcher.CreationActionA creation action for a dispatcher.static classJavaConstant.MethodHandle.Dispatcher.ForJava7CapableVmA dispatcher that extracts the information of a method handle by using private APIs that are available in Java 7+.static classJavaConstant.MethodHandle.Dispatcher.ForJava8CapableVmA dispatcher for introspecting ajava.lang.invoke.MethodHandleinstance on a virtual machine that officially supports this introspection, i.e.static classJavaConstant.MethodHandle.Dispatcher.ForLegacyVmA dispatcher that does not support method handles at all.static interfaceJavaConstant.MethodHandle.Dispatcher.InitializableAn initializable version of a dispatcher that is not yet made accessible.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Class<?>getDeclaringClass(Object methodHandleInfo)Returns the declaring class of the supplied method handle info.ObjectgetMethodType(Object methodHandleInfo)Returns a method handle info's method type.StringgetName(Object methodHandleInfo)Returns the method name of the supplied method handle info.intgetReferenceKind(Object methodHandleInfo)Returns the reference kind of the supplied method handle info.List<? extends Class<?>>parameterArray(Object methodType)Returns the parameter types of the supplied method type.Class<?>returnType(Object methodType)Returns the return type of the supplied method type.Objectreveal(Object lookup, Object methodHandle)Reveals a method handle's information object.
-
-
-
Method Detail
-
reveal
Object reveal(Object lookup, 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.
-
getMethodType
Object getMethodType(Object methodHandleInfo)
Returns a method handle info's method type.- Parameters:
methodHandleInfo- The method handle info to introspect.- Returns:
- The
java.lang.invoke.MethodTypeinstance representing the method handle's type.
-
getReferenceKind
int getReferenceKind(Object methodHandleInfo)
Returns the reference kind of the supplied method handle info.- Parameters:
methodHandleInfo- The method handle to be introspected.- Returns:
- The method handle info's reference type.
-
getDeclaringClass
Class<?> getDeclaringClass(Object methodHandleInfo)
Returns the declaring class of the supplied method handle info.- Parameters:
methodHandleInfo- The method handle to be introspected.- Returns:
- The method handle info's declaring class.
-
getName
String getName(Object methodHandleInfo)
Returns the method name of the supplied method handle info.- Parameters:
methodHandleInfo- The method handle to be introspected.- Returns:
- The method handle info's method name.
-
returnType
Class<?> returnType(Object methodType)
Returns the return type of the supplied method type.- Parameters:
methodType- The method type to be introspected.- Returns:
- The method type's return type.
-
-