Class MethodDefinition
java.lang.Object
com.strobel.assembler.metadata.MemberReference
com.strobel.assembler.metadata.MethodReference
com.strobel.assembler.metadata.MethodDefinition
- All Implemented Interfaces:
IAnnotationsProvider, IGenericContext, IGenericParameterProvider, IMemberDefinition, IMetadataTypeMember, IMethodSignature
- Direct Known Subclasses:
RecordTypeDefinition.RecordMethod
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SoftReference<MethodBody> private final Collection<CustomAnnotation> private final List<CustomAnnotation> private final AnonymousLocalTypeCollectionprivate final List<TypeDefinition> private TypeDefinitionprivate Stringprivate longprivate Stringprivate final GenericParameterCollectionprivate final List<GenericParameter> private Stringprivate final ParameterDefinitionCollectionprivate final List<ParameterDefinition> private TypeReferenceprivate Stringprivate final Collection<SourceAttribute> private final List<SourceAttribute> private final Collection<TypeReference> private final List<TypeReference> Fields inherited from class MethodReference
CONSTRUCTOR_NAME, STATIC_INITIALIZER_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringBuilderappendName(StringBuilder sb, boolean fullName, boolean dottedName) booleanfinal List<CustomAnnotation> protected final Collection<CustomAnnotation> final MethodBodygetBody()Human-readable brief description of a type or member, which does not include information super types, thrown exceptions, or modifiers other than 'static'.final List<TypeDefinition> protected final AnonymousLocalTypeCollectionfinal TypeDefinitionHuman-readable full description of a type or member, which includes specification of super types (in brief format), thrown exceptions, and modifiers.Human-readable erased description of a type or member.Method that returns type erased signature of a type or member; suitable as non-generic signature some packages need.final longgetFlags()final List<GenericParameter> protected final GenericParameterCollectionfinal intfinal StringgetName()final List<ParameterDefinition> protected final ParameterDefinitionCollectionfinal TypeReferenceMethod that returns full generic signature of a type or member.Human-readable simple description of a type or member, which does not include information super type or fully-qualified type names.final List<SourceAttribute> protected final Collection<SourceAttribute> final List<TypeReference> protected final Collection<TypeReference> final booleanhasBody()inthashCode()final booleanhasThis()voidInvalidate any signature information.final booleanfinal booleanfinal booleanfinal booleanfinal booleanfinal booleanfinal booleanisFinal()final booleanfinal booleanfinal booleanfinal booleanfinal booleanisPublic()final booleanisStatic()final booleanfinal booleanprotected final voidsetBody(MethodBody body) protected final voidsetDeclaringType(TypeDefinition declaringType) protected final voidsetFlags(long flags) protected final voidprotected final voidsetReturnType(TypeReference returnType) toString()private MethodBodyprivate booleantypeNamesMatch(TypeReference t1, TypeReference t2) Methods inherited from class MethodReference
appendErasedSignature, appendErasedSignature, appendSignature, appendSignature, containsGenericParameters, findTypeVariable, hasGenericParameters, hasParameters, isConstructor, isEquivalentTo, isGenericDefinition, isGenericMethod, isSpecialName, isTypeInitializer, resolveMethods inherited from class MemberReference
hasAnnotationsMethods inherited from interface IMemberDefinition
isSpecialName
-
Field Details
-
_genericParameters
-
_parameters
-
_declaredTypes
-
_thrownTypes
-
_customAnnotations
-
_sourceAttributes
-
_genericParametersView
-
_declaredTypesView
-
_parametersView
-
_thrownTypesView
-
_customAnnotationsView
-
_sourceAttributesView
-
_body
-
_name
-
_fullName
-
_erasedSignature
-
_signature
-
_returnType
-
_declaringType
-
_flags
private long _flags
-
-
Constructor Details
-
MethodDefinition
protected MethodDefinition()
-
-
Method Details
-
hasBody
public final boolean hasBody() -
getBody
-
hasThis
public final boolean hasThis() -
setBody
-
isDefinition
public final boolean isDefinition()- Overrides:
isDefinitionin classMemberReference
-
isAnonymousClassConstructor
public final boolean isAnonymousClassConstructor() -
getDeclaredTypes
-
getDeclaredTypesInternal
-
getGenericParameters
- Specified by:
getGenericParametersin interfaceIGenericParameterProvider- Overrides:
getGenericParametersin classMethodReference
-
getThrownTypes
- Specified by:
getThrownTypesin interfaceIMethodSignature- Overrides:
getThrownTypesin classMethodReference
-
getDeclaringType
- Specified by:
getDeclaringTypein interfaceIMemberDefinition- Specified by:
getDeclaringTypein interfaceIMetadataTypeMember- Specified by:
getDeclaringTypein classMemberReference
-
getAnnotations
- Specified by:
getAnnotationsin interfaceIAnnotationsProvider- Overrides:
getAnnotationsin classMemberReference
-
getSourceAttributes
-
getName
- Specified by:
getNamein interfaceIMemberDefinition- Specified by:
getNamein interfaceIMetadataTypeMember- Specified by:
getNamein classMemberReference
-
getFullName
- Specified by:
getFullNamein interfaceIMemberDefinition- Overrides:
getFullNamein classMemberReference
-
getSignature
Description copied from class:MemberReferenceMethod that returns full generic signature of a type or member.- Specified by:
getSignaturein interfaceIMethodSignature- Overrides:
getSignaturein classMemberReference
-
getErasedSignature
Description copied from class:MemberReferenceMethod that returns type erased signature of a type or member; suitable as non-generic signature some packages need.- Specified by:
getErasedSignaturein interfaceIMethodSignature- Overrides:
getErasedSignaturein classMemberReference
-
getReturnType
- Specified by:
getReturnTypein interfaceIMethodSignature- Specified by:
getReturnTypein classMethodReference
-
getParameters
- Specified by:
getParametersin interfaceIMethodSignature- Specified by:
getParametersin classMethodReference
-
setName
-
setReturnType
-
setDeclaringType
-
setFlags
protected final void setFlags(long flags) -
getGenericParametersInternal
-
getParametersInternal
-
getThrownTypesInternal
-
getAnnotationsInternal
-
getSourceAttributesInternal
-
hashCode
-
equals
-
invalidateSignature
public void invalidateSignature()Description copied from interface:IMethodSignatureInvalidate any signature information. This is not guaranteed to be thread-safe, should only be called when a partially constructed method definition changes, e.g., by changing the return type or parameter types.- Specified by:
invalidateSignaturein interfaceIMethodSignature- Overrides:
invalidateSignaturein classMethodReference
-
typeNamesMatch
-
isAbstract
public final boolean isAbstract() -
isDefault
public final boolean isDefault() -
isBridgeMethod
public final boolean isBridgeMethod() -
isVarArgs
public final boolean isVarArgs() -
getFlags
public final long getFlags()- Specified by:
getFlagsin interfaceIMemberDefinition
-
getModifiers
public final int getModifiers()- Specified by:
getModifiersin interfaceIMemberDefinition
-
isFinal
public final boolean isFinal()- Specified by:
isFinalin interfaceIMemberDefinition
-
isNonPublic
public final boolean isNonPublic()- Specified by:
isNonPublicin interfaceIMemberDefinition
-
isPrivate
public final boolean isPrivate()- Specified by:
isPrivatein interfaceIMemberDefinition
-
isProtected
public final boolean isProtected()- Specified by:
isProtectedin interfaceIMemberDefinition
-
isPublic
public final boolean isPublic()- Specified by:
isPublicin interfaceIMemberDefinition
-
isStatic
public final boolean isStatic()- Specified by:
isStaticin interfaceIMemberDefinition
-
isSynthetic
public final boolean isSynthetic()- Specified by:
isSyntheticin interfaceIMemberDefinition
-
isDeprecated
public final boolean isDeprecated()- Specified by:
isDeprecatedin interfaceIMemberDefinition
-
isPackagePrivate
public final boolean isPackagePrivate()- Specified by:
isPackagePrivatein interfaceIMemberDefinition
-
getBriefDescription
Human-readable brief description of a type or member, which does not include information super types, thrown exceptions, or modifiers other than 'static'.- Specified by:
getBriefDescriptionin interfaceIMemberDefinition
-
getDescription
Human-readable full description of a type or member, which includes specification of super types (in brief format), thrown exceptions, and modifiers.- Specified by:
getDescriptionin interfaceIMemberDefinition
-
getErasedDescription
Human-readable erased description of a type or member.- Specified by:
getErasedDescriptionin interfaceIMemberDefinition
-
getSimpleDescription
Human-readable simple description of a type or member, which does not include information super type or fully-qualified type names.- Specified by:
getSimpleDescriptionin interfaceIMemberDefinition
-
appendName
- Overrides:
appendNamein classMethodReference
-
appendDescription
-
appendSimpleDescription
-
appendBriefDescription
-
appendErasedDescription
-
toString
- Overrides:
toStringin classMemberReference
-
tryLoadBody
-