@HashCodeAndEqualsPlugin.Enhance public static class JavaConstant.MethodType.Dispatcher.ForJava7CapableVm extends java.lang.Object implements JavaConstant.MethodType.Dispatcher
java.lang.invoke.MethodType
type that was added in Java version 7.JavaConstant.MethodType.Dispatcher.CreationAction, JavaConstant.MethodType.Dispatcher.ForJava7CapableVm, JavaConstant.MethodType.Dispatcher.ForLegacyVm
Modifier and Type | Field and Description |
---|---|
private static java.lang.Object[] |
NO_ARGUMENTS
An empty array that can be used to indicate no arguments to avoid an allocation on a reflective call.
|
private java.lang.reflect.Method |
parameterArray
A reference to
java.lang.invoke.MethodType#returnType . |
private java.lang.reflect.Method |
returnType
A reference to
java.lang.invoke.MethodType#returnType . |
Modifier | Constructor and Description |
---|---|
protected |
ForJava7CapableVm(java.lang.reflect.Method returnType,
java.lang.reflect.Method parameterArray)
Creates a new dispatcher for a modern JVM.
|
Modifier and Type | Method and 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.
|
private static final java.lang.Object[] NO_ARGUMENTS
private final java.lang.reflect.Method returnType
java.lang.invoke.MethodType#returnType
.private final java.lang.reflect.Method parameterArray
java.lang.invoke.MethodType#returnType
.protected ForJava7CapableVm(java.lang.reflect.Method returnType, java.lang.reflect.Method parameterArray)
returnType
- A reference to java.lang.invoke.MethodType#returnType
.parameterArray
- A reference to java.lang.invoke.MethodType#returnType
.public java.lang.Class<?> returnType(java.lang.Object methodType)
returnType
in interface JavaConstant.MethodType.Dispatcher
methodType
- An instance of java.lang.invoke.MethodType
.public java.lang.Class<?>[] parameterArray(java.lang.Object methodType)
parameterArray
in interface JavaConstant.MethodType.Dispatcher
methodType
- An instance of java.lang.invoke.MethodType
.