Package com.strobel.reflection
Class DelegatingMethodInfo
- java.lang.Object
-
- com.strobel.reflection.MemberInfo
-
- com.strobel.reflection.MethodBase
-
- com.strobel.reflection.MethodInfo
-
- com.strobel.reflection.DelegatingMethodInfo
-
- All Implemented Interfaces:
java.lang.reflect.AnnotatedElement
final class DelegatingMethodInfo extends MethodInfo
-
-
Field Summary
Fields Modifier and Type Field Description private Type<?>
_declaringType
private MethodInfo
_methodInfo
private Type<?>
_reflectedType
-
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 Constructor Description DelegatingMethodInfo(MethodInfo method, Type<?> reflectedType)
DelegatingMethodInfo(MethodInfo method, Type<?> declaringType, Type<?> reflectedType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringBuilder
appendBriefDescription(java.lang.StringBuilder sb)
java.lang.StringBuilder
appendDescription(java.lang.StringBuilder sb)
java.lang.StringBuilder
appendErasedDescription(java.lang.StringBuilder sb)
java.lang.StringBuilder
appendErasedSignature(java.lang.StringBuilder sb)
java.lang.StringBuilder
appendSignature(java.lang.StringBuilder sb)
java.lang.StringBuilder
appendSimpleDescription(java.lang.StringBuilder sb)
boolean
containsGenericParameters()
MethodInfo
findBaseMethod(Type<?> relativeTo)
MethodInfo
findOverriddenMethod()
<T extends java.lang.annotation.Annotation>
TgetAnnotation(java.lang.Class<T> annotationClass)
java.lang.annotation.Annotation[]
getAnnotations()
<T extends java.lang.annotation.Annotation>
T[]getAnnotationsByType(java.lang.Class<T> annotationClass)
java.lang.String
getBriefDescription()
Human-readable brief description of a type or member, which does not include information super types, thrown exceptions, or modifiers other than 'static'.CallingConvention
getCallingConvention()
<T extends java.lang.annotation.Annotation>
TgetDeclaredAnnotation(java.lang.Class<T> annotationClass)
java.lang.annotation.Annotation[]
getDeclaredAnnotations()
<T extends java.lang.annotation.Annotation>
T[]getDeclaredAnnotationsByType(java.lang.Class<T> annotationClass)
Type<?>
getDeclaringType()
java.lang.Object
getDefaultValue()
java.lang.String
getDescription()
Human-readable full description of a type or member, which includes specification of super types (in brief format), thrown exceptions, and modifiers.java.lang.String
getErasedDescription()
Human-readable erased description of a type or member.MethodInfo
getErasedMethodDefinition()
java.lang.String
getErasedSignature()
Method that returns type erased signature of a type or member; suitable as non-generic signature some packages need.MethodInfo
getGenericMethodDefinition()
TypeList
getGenericMethodParameters()
int
getModifiers()
java.lang.String
getName()
ParameterList
getParameters()
java.lang.reflect.Method
getRawMethod()
Type<?>
getReflectedType()
Type<?>
getReturnType()
java.lang.String
getSignature()
Method that returns full generic signature of a type or member.SignatureType
getSignatureType()
java.lang.String
getSimpleDescription()
Human-readable simple description of a type or member, which does not include information super type or fully-qualified type names.TypeList
getThrownTypes()
TypeList
getTypeArguments()
TypeBindings
getTypeBindings()
java.lang.Object
invoke(java.lang.Object instance, java.lang.Object... args)
boolean
isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
boolean
isEquivalentTo(MemberInfo m)
boolean
isGenericMethod()
boolean
isGenericMethodDefinition()
MethodInfo
makeGenericMethod(Type<?>... typeArguments)
MethodInfo
makeGenericMethod(TypeList typeArguments)
java.lang.String
toString()
private static MethodInfo
unwrap(MethodInfo method)
-
Methods inherited from class com.strobel.reflection.MethodInfo
appendModifiers, containsGenericParameter, declaredOn, emptyMethods, getMemberType, isAbstract, isDefault, reflectedOn
-
Methods inherited from class com.strobel.reflection.MemberInfo
appendGenericSignature, emptyAnnotations, equals, hashCode, invalidateCaches, isFinal, isNonPublic, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
-
-
-
-
Field Detail
-
_reflectedType
private final Type<?> _reflectedType
-
_declaringType
private final Type<?> _declaringType
-
_methodInfo
private final MethodInfo _methodInfo
-
-
Constructor Detail
-
DelegatingMethodInfo
DelegatingMethodInfo(MethodInfo method, Type<?> reflectedType)
-
DelegatingMethodInfo
DelegatingMethodInfo(MethodInfo method, Type<?> declaringType, Type<?> reflectedType)
-
-
Method Detail
-
unwrap
private static MethodInfo unwrap(MethodInfo method)
-
getReturnType
public Type<?> getReturnType()
- Specified by:
getReturnType
in classMethodInfo
-
getRawMethod
public java.lang.reflect.Method getRawMethod()
- Specified by:
getRawMethod
in classMethodInfo
-
getDefaultValue
public java.lang.Object getDefaultValue()
- Overrides:
getDefaultValue
in classMethodInfo
-
getName
public java.lang.String getName()
- Overrides:
getName
in classMethodInfo
-
getAnnotation
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
- Specified by:
getAnnotation
in interfacejava.lang.reflect.AnnotatedElement
- Overrides:
getAnnotation
in classMethodInfo
-
getAnnotations
@NotNull public java.lang.annotation.Annotation[] getAnnotations()
- Specified by:
getAnnotations
in interfacejava.lang.reflect.AnnotatedElement
- Overrides:
getAnnotations
in classMethodInfo
-
getDeclaredAnnotations
@NotNull public java.lang.annotation.Annotation[] getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotations
in interfacejava.lang.reflect.AnnotatedElement
- Overrides:
getDeclaredAnnotations
in classMethodInfo
-
isAnnotationPresent
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
- Specified by:
isAnnotationPresent
in interfacejava.lang.reflect.AnnotatedElement
- Overrides:
isAnnotationPresent
in classMethodInfo
-
invoke
public java.lang.Object invoke(java.lang.Object instance, java.lang.Object... args)
- Overrides:
invoke
in classMethodInfo
-
findOverriddenMethod
public MethodInfo findOverriddenMethod()
- Overrides:
findOverriddenMethod
in classMethodInfo
-
findBaseMethod
public MethodInfo findBaseMethod(Type<?> relativeTo)
- Overrides:
findBaseMethod
in classMethodInfo
-
appendDescription
public java.lang.StringBuilder appendDescription(java.lang.StringBuilder sb)
- Overrides:
appendDescription
in classMethodInfo
-
appendSimpleDescription
public java.lang.StringBuilder appendSimpleDescription(java.lang.StringBuilder sb)
- Overrides:
appendSimpleDescription
in classMethodInfo
-
appendBriefDescription
public java.lang.StringBuilder appendBriefDescription(java.lang.StringBuilder sb)
- Overrides:
appendBriefDescription
in classMethodInfo
-
appendErasedDescription
public java.lang.StringBuilder appendErasedDescription(java.lang.StringBuilder sb)
- Overrides:
appendErasedDescription
in classMethodInfo
-
appendSignature
public java.lang.StringBuilder appendSignature(java.lang.StringBuilder sb)
- Overrides:
appendSignature
in classMethodInfo
-
appendErasedSignature
public java.lang.StringBuilder appendErasedSignature(java.lang.StringBuilder sb)
- Overrides:
appendErasedSignature
in classMethodInfo
-
isGenericMethod
public boolean isGenericMethod()
- Overrides:
isGenericMethod
in classMethodInfo
-
isGenericMethodDefinition
public boolean isGenericMethodDefinition()
- Overrides:
isGenericMethodDefinition
in classMethodInfo
-
getTypeBindings
public TypeBindings getTypeBindings()
- Overrides:
getTypeBindings
in classMethodInfo
-
getTypeArguments
public TypeList getTypeArguments()
- Overrides:
getTypeArguments
in classMethodInfo
-
getGenericMethodParameters
public TypeList getGenericMethodParameters()
- Overrides:
getGenericMethodParameters
in classMethodInfo
-
getGenericMethodDefinition
public MethodInfo getGenericMethodDefinition()
- Overrides:
getGenericMethodDefinition
in classMethodInfo
-
getErasedMethodDefinition
public MethodInfo getErasedMethodDefinition()
- Overrides:
getErasedMethodDefinition
in classMethodInfo
-
containsGenericParameters
public boolean containsGenericParameters()
- Overrides:
containsGenericParameters
in classMethodInfo
-
makeGenericMethod
public MethodInfo makeGenericMethod(Type<?>... typeArguments)
- Overrides:
makeGenericMethod
in classMethodInfo
-
makeGenericMethod
public MethodInfo makeGenericMethod(TypeList typeArguments)
- Overrides:
makeGenericMethod
in classMethodInfo
-
getSignatureType
public SignatureType getSignatureType()
- Specified by:
getSignatureType
in classMethodBase
-
getParameters
public ParameterList getParameters()
- Overrides:
getParameters
in classMethodBase
-
getThrownTypes
public TypeList getThrownTypes()
- Overrides:
getThrownTypes
in classMethodBase
-
getCallingConvention
public CallingConvention getCallingConvention()
- Overrides:
getCallingConvention
in classMethodBase
-
getDeclaringType
public Type<?> getDeclaringType()
- Specified by:
getDeclaringType
in classMemberInfo
-
getReflectedType
public Type<?> getReflectedType()
- Overrides:
getReflectedType
in classMemberInfo
-
getModifiers
public int getModifiers()
- Specified by:
getModifiers
in classMemberInfo
-
getDeclaredAnnotation
public <T extends java.lang.annotation.Annotation> T getDeclaredAnnotation(java.lang.Class<T> annotationClass)
- Specified by:
getDeclaredAnnotation
in interfacejava.lang.reflect.AnnotatedElement
- Overrides:
getDeclaredAnnotation
in classMemberInfo
-
getAnnotationsByType
public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(java.lang.Class<T> annotationClass)
- Specified by:
getAnnotationsByType
in interfacejava.lang.reflect.AnnotatedElement
- Overrides:
getAnnotationsByType
in classMemberInfo
-
getDeclaredAnnotationsByType
public <T extends java.lang.annotation.Annotation> T[] getDeclaredAnnotationsByType(java.lang.Class<T> annotationClass)
- Specified by:
getDeclaredAnnotationsByType
in interfacejava.lang.reflect.AnnotatedElement
- Overrides:
getDeclaredAnnotationsByType
in classMemberInfo
-
isEquivalentTo
public boolean isEquivalentTo(MemberInfo m)
- Overrides:
isEquivalentTo
in classMethodInfo
-
getSignature
public java.lang.String getSignature()
Description copied from class:MemberInfo
Method that returns full generic signature of a type or member.- Overrides:
getSignature
in classMemberInfo
-
getErasedSignature
public java.lang.String getErasedSignature()
Description copied from class:MemberInfo
Method that returns type erased signature of a type or member; suitable as non-generic signature some packages need.- Overrides:
getErasedSignature
in classMemberInfo
-
getBriefDescription
public java.lang.String getBriefDescription()
Description copied from class:MemberInfo
Human-readable brief description of a type or member, which does not include information super types, thrown exceptions, or modifiers other than 'static'.- Overrides:
getBriefDescription
in classMemberInfo
-
getDescription
public java.lang.String getDescription()
Description copied from class:MemberInfo
Human-readable full description of a type or member, which includes specification of super types (in brief format), thrown exceptions, and modifiers.- Overrides:
getDescription
in classMemberInfo
-
getErasedDescription
public java.lang.String getErasedDescription()
Description copied from class:MemberInfo
Human-readable erased description of a type or member.- Overrides:
getErasedDescription
in classMemberInfo
-
getSimpleDescription
public java.lang.String getSimpleDescription()
Description copied from class:MemberInfo
Human-readable simple description of a type or member, which does not include information super type or fully-qualified type names.- Overrides:
getSimpleDescription
in classMemberInfo
-
toString
public java.lang.String toString()
- Overrides:
toString
in classMemberInfo
-
-