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<?>_declaringTypeprivate MethodInfo_methodInfoprivate 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.StringBuilderappendBriefDescription(java.lang.StringBuilder sb)java.lang.StringBuilderappendDescription(java.lang.StringBuilder sb)java.lang.StringBuilderappendErasedDescription(java.lang.StringBuilder sb)java.lang.StringBuilderappendErasedSignature(java.lang.StringBuilder sb)java.lang.StringBuilderappendSignature(java.lang.StringBuilder sb)java.lang.StringBuilderappendSimpleDescription(java.lang.StringBuilder sb)booleancontainsGenericParameters()MethodInfofindBaseMethod(Type<?> relativeTo)MethodInfofindOverriddenMethod()<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.StringgetBriefDescription()Human-readable brief description of a type or member, which does not include information super types, thrown exceptions, or modifiers other than 'static'.CallingConventiongetCallingConvention()<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.ObjectgetDefaultValue()java.lang.StringgetDescription()Human-readable full description of a type or member, which includes specification of super types (in brief format), thrown exceptions, and modifiers.java.lang.StringgetErasedDescription()Human-readable erased description of a type or member.MethodInfogetErasedMethodDefinition()java.lang.StringgetErasedSignature()Method that returns type erased signature of a type or member; suitable as non-generic signature some packages need.MethodInfogetGenericMethodDefinition()TypeListgetGenericMethodParameters()intgetModifiers()java.lang.StringgetName()ParameterListgetParameters()java.lang.reflect.MethodgetRawMethod()Type<?>getReflectedType()Type<?>getReturnType()java.lang.StringgetSignature()Method that returns full generic signature of a type or member.SignatureTypegetSignatureType()java.lang.StringgetSimpleDescription()Human-readable simple description of a type or member, which does not include information super type or fully-qualified type names.TypeListgetThrownTypes()TypeListgetTypeArguments()TypeBindingsgetTypeBindings()java.lang.Objectinvoke(java.lang.Object instance, java.lang.Object... args)booleanisAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)booleanisEquivalentTo(MemberInfo m)booleanisGenericMethod()booleanisGenericMethodDefinition()MethodInfomakeGenericMethod(Type<?>... typeArguments)MethodInfomakeGenericMethod(TypeList typeArguments)java.lang.StringtoString()private static MethodInfounwrap(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:
getReturnTypein classMethodInfo
-
getRawMethod
public java.lang.reflect.Method getRawMethod()
- Specified by:
getRawMethodin classMethodInfo
-
getDefaultValue
public java.lang.Object getDefaultValue()
- Overrides:
getDefaultValuein classMethodInfo
-
getName
public java.lang.String getName()
- Overrides:
getNamein classMethodInfo
-
getAnnotation
public <T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationClass)
- Specified by:
getAnnotationin interfacejava.lang.reflect.AnnotatedElement- Overrides:
getAnnotationin classMethodInfo
-
getAnnotations
@NotNull public java.lang.annotation.Annotation[] getAnnotations()
- Specified by:
getAnnotationsin interfacejava.lang.reflect.AnnotatedElement- Overrides:
getAnnotationsin classMethodInfo
-
getDeclaredAnnotations
@NotNull public java.lang.annotation.Annotation[] getDeclaredAnnotations()
- Specified by:
getDeclaredAnnotationsin interfacejava.lang.reflect.AnnotatedElement- Overrides:
getDeclaredAnnotationsin classMethodInfo
-
isAnnotationPresent
public boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationClass)
- Specified by:
isAnnotationPresentin interfacejava.lang.reflect.AnnotatedElement- Overrides:
isAnnotationPresentin classMethodInfo
-
invoke
public java.lang.Object invoke(java.lang.Object instance, java.lang.Object... args)- Overrides:
invokein classMethodInfo
-
findOverriddenMethod
public MethodInfo findOverriddenMethod()
- Overrides:
findOverriddenMethodin classMethodInfo
-
findBaseMethod
public MethodInfo findBaseMethod(Type<?> relativeTo)
- Overrides:
findBaseMethodin classMethodInfo
-
appendDescription
public java.lang.StringBuilder appendDescription(java.lang.StringBuilder sb)
- Overrides:
appendDescriptionin classMethodInfo
-
appendSimpleDescription
public java.lang.StringBuilder appendSimpleDescription(java.lang.StringBuilder sb)
- Overrides:
appendSimpleDescriptionin classMethodInfo
-
appendBriefDescription
public java.lang.StringBuilder appendBriefDescription(java.lang.StringBuilder sb)
- Overrides:
appendBriefDescriptionin classMethodInfo
-
appendErasedDescription
public java.lang.StringBuilder appendErasedDescription(java.lang.StringBuilder sb)
- Overrides:
appendErasedDescriptionin classMethodInfo
-
appendSignature
public java.lang.StringBuilder appendSignature(java.lang.StringBuilder sb)
- Overrides:
appendSignaturein classMethodInfo
-
appendErasedSignature
public java.lang.StringBuilder appendErasedSignature(java.lang.StringBuilder sb)
- Overrides:
appendErasedSignaturein classMethodInfo
-
isGenericMethod
public boolean isGenericMethod()
- Overrides:
isGenericMethodin classMethodInfo
-
isGenericMethodDefinition
public boolean isGenericMethodDefinition()
- Overrides:
isGenericMethodDefinitionin classMethodInfo
-
getTypeBindings
public TypeBindings getTypeBindings()
- Overrides:
getTypeBindingsin classMethodInfo
-
getTypeArguments
public TypeList getTypeArguments()
- Overrides:
getTypeArgumentsin classMethodInfo
-
getGenericMethodParameters
public TypeList getGenericMethodParameters()
- Overrides:
getGenericMethodParametersin classMethodInfo
-
getGenericMethodDefinition
public MethodInfo getGenericMethodDefinition()
- Overrides:
getGenericMethodDefinitionin classMethodInfo
-
getErasedMethodDefinition
public MethodInfo getErasedMethodDefinition()
- Overrides:
getErasedMethodDefinitionin classMethodInfo
-
containsGenericParameters
public boolean containsGenericParameters()
- Overrides:
containsGenericParametersin classMethodInfo
-
makeGenericMethod
public MethodInfo makeGenericMethod(Type<?>... typeArguments)
- Overrides:
makeGenericMethodin classMethodInfo
-
makeGenericMethod
public MethodInfo makeGenericMethod(TypeList typeArguments)
- Overrides:
makeGenericMethodin classMethodInfo
-
getSignatureType
public SignatureType getSignatureType()
- Specified by:
getSignatureTypein classMethodBase
-
getParameters
public ParameterList getParameters()
- Overrides:
getParametersin classMethodBase
-
getThrownTypes
public TypeList getThrownTypes()
- Overrides:
getThrownTypesin classMethodBase
-
getCallingConvention
public CallingConvention getCallingConvention()
- Overrides:
getCallingConventionin classMethodBase
-
getDeclaringType
public Type<?> getDeclaringType()
- Specified by:
getDeclaringTypein classMemberInfo
-
getReflectedType
public Type<?> getReflectedType()
- Overrides:
getReflectedTypein classMemberInfo
-
getModifiers
public int getModifiers()
- Specified by:
getModifiersin classMemberInfo
-
getDeclaredAnnotation
public <T extends java.lang.annotation.Annotation> T getDeclaredAnnotation(java.lang.Class<T> annotationClass)
- Specified by:
getDeclaredAnnotationin interfacejava.lang.reflect.AnnotatedElement- Overrides:
getDeclaredAnnotationin classMemberInfo
-
getAnnotationsByType
public <T extends java.lang.annotation.Annotation> T[] getAnnotationsByType(java.lang.Class<T> annotationClass)
- Specified by:
getAnnotationsByTypein interfacejava.lang.reflect.AnnotatedElement- Overrides:
getAnnotationsByTypein classMemberInfo
-
getDeclaredAnnotationsByType
public <T extends java.lang.annotation.Annotation> T[] getDeclaredAnnotationsByType(java.lang.Class<T> annotationClass)
- Specified by:
getDeclaredAnnotationsByTypein interfacejava.lang.reflect.AnnotatedElement- Overrides:
getDeclaredAnnotationsByTypein classMemberInfo
-
isEquivalentTo
public boolean isEquivalentTo(MemberInfo m)
- Overrides:
isEquivalentToin classMethodInfo
-
getSignature
public java.lang.String getSignature()
Description copied from class:MemberInfoMethod that returns full generic signature of a type or member.- Overrides:
getSignaturein classMemberInfo
-
getErasedSignature
public java.lang.String getErasedSignature()
Description copied from class:MemberInfoMethod that returns type erased signature of a type or member; suitable as non-generic signature some packages need.- Overrides:
getErasedSignaturein classMemberInfo
-
getBriefDescription
public java.lang.String getBriefDescription()
Description copied from class:MemberInfoHuman-readable brief description of a type or member, which does not include information super types, thrown exceptions, or modifiers other than 'static'.- Overrides:
getBriefDescriptionin classMemberInfo
-
getDescription
public java.lang.String getDescription()
Description copied from class:MemberInfoHuman-readable full description of a type or member, which includes specification of super types (in brief format), thrown exceptions, and modifiers.- Overrides:
getDescriptionin classMemberInfo
-
getErasedDescription
public java.lang.String getErasedDescription()
Description copied from class:MemberInfoHuman-readable erased description of a type or member.- Overrides:
getErasedDescriptionin classMemberInfo
-
getSimpleDescription
public java.lang.String getSimpleDescription()
Description copied from class:MemberInfoHuman-readable simple description of a type or member, which does not include information super type or fully-qualified type names.- Overrides:
getSimpleDescriptionin classMemberInfo
-
toString
public java.lang.String toString()
- Overrides:
toStringin classMemberInfo
-
-