Package net.bytebuddy.utility
Class JavaConstant.MethodType.Dispatcher.ForJava7CapableVm
- java.lang.Object
-
- net.bytebuddy.utility.JavaConstant.MethodType.Dispatcher.ForJava7CapableVm
-
- All Implemented Interfaces:
JavaConstant.MethodType.Dispatcher
- Enclosing interface:
- JavaConstant.MethodType.Dispatcher
public static class JavaConstant.MethodType.Dispatcher.ForJava7CapableVm extends java.lang.Object implements JavaConstant.MethodType.Dispatcher
A dispatcher for virtual machines that are aware of thejava.lang.invoke.MethodType
type that was added in Java version 7.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.utility.JavaConstant.MethodType.Dispatcher
JavaConstant.MethodType.Dispatcher.CreationAction, JavaConstant.MethodType.Dispatcher.ForJava7CapableVm, JavaConstant.MethodType.Dispatcher.ForLegacyVm
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForJava7CapableVm(java.lang.reflect.Method returnType, java.lang.reflect.Method parameterArray)
Creates a new dispatcher for a modern JVM.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<?>[]
parameterArray(java.lang.Object methodType)
Extracts the parameter types of the supplied method type.java.lang.Class<?>
returnType(java.lang.Object methodType)
Extracts the return type of the supplied method type.
-
-
-
Constructor Detail
-
ForJava7CapableVm
protected ForJava7CapableVm(java.lang.reflect.Method returnType, java.lang.reflect.Method parameterArray)
Creates a new dispatcher for a modern JVM.- Parameters:
returnType
- A reference tojava.lang.invoke.MethodType#returnType
.parameterArray
- A reference tojava.lang.invoke.MethodType#returnType
.
-
-
Method Detail
-
returnType
public java.lang.Class<?> returnType(java.lang.Object methodType)
Description copied from interface:JavaConstant.MethodType.Dispatcher
Extracts the return type of the supplied method type.- Specified by:
returnType
in interfaceJavaConstant.MethodType.Dispatcher
- Parameters:
methodType
- An instance ofjava.lang.invoke.MethodType
.- Returns:
- The return type that is described by the supplied instance.
-
parameterArray
public java.lang.Class<?>[] parameterArray(java.lang.Object methodType)
Description copied from interface:JavaConstant.MethodType.Dispatcher
Extracts the parameter types of the supplied method type.- Specified by:
parameterArray
in interfaceJavaConstant.MethodType.Dispatcher
- Parameters:
methodType
- An instance ofjava.lang.invoke.MethodType
.- Returns:
- The parameter types that are described by the supplied instance.
-
-