Package com.strobel.reflection
Class DynamicMethod
- java.lang.Object
-
- com.strobel.reflection.MemberInfo
-
- com.strobel.reflection.MethodBase
-
- com.strobel.reflection.MethodInfo
-
- com.strobel.reflection.DynamicMethod
-
- All Implemented Interfaces:
java.lang.reflect.AnnotatedElement
public final class DynamicMethod extends MethodInfo
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.Method
_invokeMethod
private java.lang.invoke.MethodHandle
_methodHandle
private ParameterList
_parameters
private SignatureType
_signatureType
private static java.lang.reflect.Method
INVOKE
private static java.lang.reflect.Method
INVOKE_EXACT
-
Fields inherited from class com.strobel.reflection.MethodInfo
_erasedMethodDefinition
-
Fields inherited from class com.strobel.reflection.MemberInfo
EMPTY_ANNOTATIONS, ENUM_MODIFIER, VARARGS_MODIFIER
-
-
Constructor Summary
Constructors Modifier Constructor Description private
DynamicMethod(java.lang.invoke.MethodHandle methodHandle, java.lang.reflect.Method invokeMethod)
private
DynamicMethod(java.lang.invoke.MethodType methodType, java.lang.reflect.Method invokeMethod)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Type<?>
getDeclaringType()
java.lang.invoke.MethodHandle
getHandle()
int
getModifiers()
ParameterList
getParameters()
java.lang.reflect.Method
getRawMethod()
Type<?>
getReturnType()
SignatureType
getSignatureType()
static DynamicMethod
invoke(java.lang.invoke.MethodHandle methodHandle)
static DynamicMethod
invoke(java.lang.invoke.MethodType methodType)
static DynamicMethod
invokeExact(java.lang.invoke.MethodHandle methodHandle)
static DynamicMethod
invokeExact(java.lang.invoke.MethodType methodType)
-
Methods inherited from class com.strobel.reflection.MethodInfo
appendBriefDescription, appendDescription, appendErasedDescription, appendErasedSignature, appendModifiers, appendSignature, appendSimpleDescription, containsGenericParameter, containsGenericParameters, declaredOn, emptyMethods, findBaseMethod, findOverriddenMethod, getAnnotation, getAnnotations, getDeclaredAnnotations, getDefaultValue, getErasedMethodDefinition, getGenericMethodDefinition, getGenericMethodParameters, getMemberType, getName, getTypeArguments, getTypeBindings, invoke, isAbstract, isAnnotationPresent, isDefault, isEquivalentTo, isGenericMethod, isGenericMethodDefinition, makeGenericMethod, makeGenericMethod, reflectedOn
-
Methods inherited from class com.strobel.reflection.MethodBase
getCallingConvention, getThrownTypes
-
Methods inherited from class com.strobel.reflection.MemberInfo
appendGenericSignature, emptyAnnotations, equals, getAnnotationsByType, getBriefDescription, getDeclaredAnnotation, getDeclaredAnnotationsByType, getDescription, getErasedDescription, getErasedSignature, getReflectedType, getSignature, getSimpleDescription, hashCode, invalidateCaches, isFinal, isNonPublic, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, toString
-
-
-
-
Field Detail
-
INVOKE_EXACT
private static final java.lang.reflect.Method INVOKE_EXACT
-
INVOKE
private static final java.lang.reflect.Method INVOKE
-
_parameters
private final ParameterList _parameters
-
_invokeMethod
private final java.lang.reflect.Method _invokeMethod
-
_methodHandle
private final java.lang.invoke.MethodHandle _methodHandle
-
_signatureType
private final SignatureType _signatureType
-
-
Method Detail
-
invoke
public static DynamicMethod invoke(java.lang.invoke.MethodHandle methodHandle)
-
invokeExact
public static DynamicMethod invokeExact(java.lang.invoke.MethodHandle methodHandle)
-
invoke
public static DynamicMethod invoke(java.lang.invoke.MethodType methodType)
-
invokeExact
public static DynamicMethod invokeExact(java.lang.invoke.MethodType methodType)
-
getHandle
public java.lang.invoke.MethodHandle getHandle()
-
getReturnType
public Type<?> getReturnType()
- Specified by:
getReturnType
in classMethodInfo
-
getSignatureType
public SignatureType getSignatureType()
- Specified by:
getSignatureType
in classMethodBase
-
getRawMethod
public java.lang.reflect.Method getRawMethod()
- Specified by:
getRawMethod
in classMethodInfo
-
getDeclaringType
public Type<?> getDeclaringType()
- Specified by:
getDeclaringType
in classMemberInfo
-
getModifiers
public int getModifiers()
- Specified by:
getModifiers
in classMemberInfo
-
getParameters
public ParameterList getParameters()
- Overrides:
getParameters
in classMethodBase
-
-