Package com.strobel.assembler.metadata
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 AnonymousLocalTypeCollection
private final List
<TypeDefinition> private TypeDefinition
private String
private long
private String
private final GenericParameterCollection
private final List
<GenericParameter> private String
private final ParameterDefinitionCollection
private final List
<ParameterDefinition> private TypeReference
private String
private final Collection
<SourceAttribute> private final List
<SourceAttribute> private final Collection
<TypeReference> private final List
<TypeReference> Fields inherited from class com.strobel.assembler.metadata.MethodReference
CONSTRUCTOR_NAME, STATIC_INITIALIZER_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringBuilder
appendName
(StringBuilder sb, boolean fullName, boolean dottedName) boolean
final List
<CustomAnnotation> protected final Collection
<CustomAnnotation> final MethodBody
getBody()
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 AnonymousLocalTypeCollection
final TypeDefinition
Human-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 long
getFlags()
final List
<GenericParameter> protected final GenericParameterCollection
final int
final String
getName()
final List
<ParameterDefinition> protected final ParameterDefinitionCollection
final TypeReference
Method 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 boolean
hasBody()
int
hashCode()
final boolean
hasThis()
void
Invalidate any signature information.final boolean
final boolean
final boolean
final boolean
final boolean
final boolean
final boolean
isFinal()
final boolean
final boolean
final boolean
final boolean
final boolean
isPublic()
final boolean
isStatic()
final boolean
final boolean
protected final void
setBody
(MethodBody body) protected final void
setDeclaringType
(TypeDefinition declaringType) protected final void
setFlags
(long flags) protected final void
protected final void
setReturnType
(TypeReference returnType) toString()
private MethodBody
private boolean
typeNamesMatch
(TypeReference t1, TypeReference t2) Methods inherited from class com.strobel.assembler.metadata.MethodReference
appendErasedSignature, appendErasedSignature, appendSignature, appendSignature, containsGenericParameters, findTypeVariable, hasGenericParameters, hasParameters, isConstructor, isEquivalentTo, isGenericDefinition, isGenericMethod, isSpecialName, isTypeInitializer, resolve
Methods inherited from class com.strobel.assembler.metadata.MemberReference
hasAnnotations
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.strobel.assembler.metadata.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:
isDefinition
in classMemberReference
-
isAnonymousClassConstructor
public final boolean isAnonymousClassConstructor() -
getDeclaredTypes
-
getDeclaredTypesInternal
-
getGenericParameters
- Specified by:
getGenericParameters
in interfaceIGenericParameterProvider
- Overrides:
getGenericParameters
in classMethodReference
-
getThrownTypes
- Specified by:
getThrownTypes
in interfaceIMethodSignature
- Overrides:
getThrownTypes
in classMethodReference
-
getDeclaringType
- Specified by:
getDeclaringType
in interfaceIMemberDefinition
- Specified by:
getDeclaringType
in interfaceIMetadataTypeMember
- Specified by:
getDeclaringType
in classMemberReference
-
getAnnotations
- Specified by:
getAnnotations
in interfaceIAnnotationsProvider
- Overrides:
getAnnotations
in classMemberReference
-
getSourceAttributes
-
getName
- Specified by:
getName
in interfaceIMemberDefinition
- Specified by:
getName
in interfaceIMetadataTypeMember
- Specified by:
getName
in classMemberReference
-
getFullName
- Specified by:
getFullName
in interfaceIMemberDefinition
- Overrides:
getFullName
in classMemberReference
-
getSignature
Description copied from class:MemberReference
Method that returns full generic signature of a type or member.- Specified by:
getSignature
in interfaceIMethodSignature
- Overrides:
getSignature
in classMemberReference
-
getErasedSignature
Description copied from class:MemberReference
Method that returns type erased signature of a type or member; suitable as non-generic signature some packages need.- Specified by:
getErasedSignature
in interfaceIMethodSignature
- Overrides:
getErasedSignature
in classMemberReference
-
getReturnType
- Specified by:
getReturnType
in interfaceIMethodSignature
- Specified by:
getReturnType
in classMethodReference
-
getParameters
- Specified by:
getParameters
in interfaceIMethodSignature
- Specified by:
getParameters
in classMethodReference
-
setName
-
setReturnType
-
setDeclaringType
-
setFlags
protected final void setFlags(long flags) -
getGenericParametersInternal
-
getParametersInternal
-
getThrownTypesInternal
-
getAnnotationsInternal
-
getSourceAttributesInternal
-
hashCode
public int hashCode() -
equals
-
invalidateSignature
public void invalidateSignature()Description copied from interface:IMethodSignature
Invalidate 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:
invalidateSignature
in interfaceIMethodSignature
- Overrides:
invalidateSignature
in 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:
getFlags
in interfaceIMemberDefinition
-
getModifiers
public final int getModifiers()- Specified by:
getModifiers
in interfaceIMemberDefinition
-
isFinal
public final boolean isFinal()- Specified by:
isFinal
in interfaceIMemberDefinition
-
isNonPublic
public final boolean isNonPublic()- Specified by:
isNonPublic
in interfaceIMemberDefinition
-
isPrivate
public final boolean isPrivate()- Specified by:
isPrivate
in interfaceIMemberDefinition
-
isProtected
public final boolean isProtected()- Specified by:
isProtected
in interfaceIMemberDefinition
-
isPublic
public final boolean isPublic()- Specified by:
isPublic
in interfaceIMemberDefinition
-
isStatic
public final boolean isStatic()- Specified by:
isStatic
in interfaceIMemberDefinition
-
isSynthetic
public final boolean isSynthetic()- Specified by:
isSynthetic
in interfaceIMemberDefinition
-
isDeprecated
public final boolean isDeprecated()- Specified by:
isDeprecated
in interfaceIMemberDefinition
-
isPackagePrivate
public final boolean isPackagePrivate()- Specified by:
isPackagePrivate
in 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:
getBriefDescription
in 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:
getDescription
in interfaceIMemberDefinition
-
getErasedDescription
Human-readable erased description of a type or member.- Specified by:
getErasedDescription
in 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:
getSimpleDescription
in interfaceIMemberDefinition
-
appendName
- Overrides:
appendName
in classMethodReference
-
appendDescription
-
appendSimpleDescription
-
appendBriefDescription
-
appendErasedDescription
-
toString
- Overrides:
toString
in classMemberReference
-
tryLoadBody
-