Package com.strobel.assembler.metadata
Class FieldDefinition
- java.lang.Object
-
- com.strobel.assembler.metadata.MemberReference
-
- com.strobel.assembler.metadata.FieldReference
-
- com.strobel.assembler.metadata.FieldDefinition
-
- All Implemented Interfaces:
IAnnotationsProvider
,IConstantValueProvider
,IMemberDefinition
,IMetadataTypeMember
public class FieldDefinition extends FieldReference implements IMemberDefinition, IConstantValueProvider
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Object
_constantValue
private Collection<CustomAnnotation>
_customAnnotations
private java.util.List<CustomAnnotation>
_customAnnotationsView
private TypeDefinition
_declaringType
private TypeReference
_fieldType
private long
_flags
private java.lang.String
_name
private Collection<SourceAttribute>
_sourceAttributes
private java.util.List<SourceAttribute>
_sourceAttributesView
-
Constructor Summary
Constructors Modifier Constructor Description protected
FieldDefinition(TypeReference fieldType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringBuilder
appendBriefDescription(java.lang.StringBuilder sb)
protected java.lang.StringBuilder
appendDescription(java.lang.StringBuilder sb)
protected java.lang.StringBuilder
appendErasedDescription(java.lang.StringBuilder sb)
protected java.lang.StringBuilder
appendName(java.lang.StringBuilder sb, boolean fullName, boolean dottedName)
protected java.lang.StringBuilder
appendSimpleDescription(java.lang.StringBuilder sb)
boolean
equals(java.lang.Object obj)
java.util.List<CustomAnnotation>
getAnnotations()
protected Collection<CustomAnnotation>
getAnnotationsInternal()
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'.java.lang.Object
getConstantValue()
TypeDefinition
getDeclaringType()
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.TypeReference
getFieldType()
long
getFlags()
int
getModifiers()
java.lang.String
getName()
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.java.util.List<SourceAttribute>
getSourceAttributes()
protected Collection<SourceAttribute>
getSourceAttributesInternal()
boolean
hasConstantValue()
int
hashCode()
boolean
isDefinition()
boolean
isDeprecated()
boolean
isEnumConstant()
boolean
isFinal()
boolean
isNonPublic()
boolean
isPackagePrivate()
boolean
isPrivate()
boolean
isProtected()
boolean
isPublic()
boolean
isStatic()
boolean
isSynthetic()
protected void
setConstantValue(java.lang.Object constantValue)
protected void
setDeclaringType(TypeDefinition declaringType)
protected void
setFieldType(TypeReference fieldType)
protected void
setFlags(long flags)
protected void
setName(java.lang.String name)
java.lang.String
toString()
private boolean
typeNamesMatch(TypeReference t1, TypeReference t2)
-
Methods inherited from class com.strobel.assembler.metadata.FieldReference
appendErasedSignature, appendSignature, containsGenericParameters, isEquivalentTo, resolve
-
Methods inherited from class com.strobel.assembler.metadata.MemberReference
getErasedSignature, getFullName, getSignature, hasAnnotations, isSpecialName
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.strobel.assembler.metadata.IMemberDefinition
getFullName, isSpecialName
-
-
-
-
Field Detail
-
_customAnnotations
private final Collection<CustomAnnotation> _customAnnotations
-
_sourceAttributes
private final Collection<SourceAttribute> _sourceAttributes
-
_customAnnotationsView
private final java.util.List<CustomAnnotation> _customAnnotationsView
-
_sourceAttributesView
private final java.util.List<SourceAttribute> _sourceAttributesView
-
_name
private java.lang.String _name
-
_fieldType
private TypeReference _fieldType
-
_declaringType
private TypeDefinition _declaringType
-
_constantValue
private java.lang.Object _constantValue
-
_flags
private long _flags
-
-
Constructor Detail
-
FieldDefinition
protected FieldDefinition(TypeReference fieldType)
-
-
Method Detail
-
getAnnotations
public final java.util.List<CustomAnnotation> getAnnotations()
- Specified by:
getAnnotations
in interfaceIAnnotationsProvider
- Overrides:
getAnnotations
in classMemberReference
-
getAnnotationsInternal
protected final Collection<CustomAnnotation> getAnnotationsInternal()
-
getSourceAttributes
public final java.util.List<SourceAttribute> getSourceAttributes()
-
getSourceAttributesInternal
protected final Collection<SourceAttribute> getSourceAttributesInternal()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
typeNamesMatch
private boolean typeNamesMatch(TypeReference t1, TypeReference t2)
-
isEnumConstant
public final boolean isEnumConstant()
-
hasConstantValue
public final boolean hasConstantValue()
- Specified by:
hasConstantValue
in interfaceIConstantValueProvider
-
getConstantValue
public final java.lang.Object getConstantValue()
- Specified by:
getConstantValue
in interfaceIConstantValueProvider
-
getFieldType
public final TypeReference getFieldType()
- Specified by:
getFieldType
in classFieldReference
-
setFieldType
protected final void setFieldType(TypeReference fieldType)
-
setConstantValue
protected final void setConstantValue(java.lang.Object constantValue)
-
getName
public final java.lang.String getName()
- Specified by:
getName
in interfaceIMemberDefinition
- Specified by:
getName
in interfaceIMetadataTypeMember
- Specified by:
getName
in classMemberReference
-
setName
protected final void setName(java.lang.String name)
-
isDefinition
public final boolean isDefinition()
- Overrides:
isDefinition
in classMemberReference
-
getDeclaringType
public final TypeDefinition getDeclaringType()
- Specified by:
getDeclaringType
in interfaceIMemberDefinition
- Specified by:
getDeclaringType
in interfaceIMetadataTypeMember
- Specified by:
getDeclaringType
in classMemberReference
-
setDeclaringType
protected final void setDeclaringType(TypeDefinition declaringType)
-
getFlags
public final long getFlags()
- Specified by:
getFlags
in interfaceIMemberDefinition
-
setFlags
protected final void setFlags(long flags)
-
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
public 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'.- Specified by:
getBriefDescription
in interfaceIMemberDefinition
-
getDescription
public 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.- Specified by:
getDescription
in interfaceIMemberDefinition
-
getErasedDescription
public java.lang.String getErasedDescription()
Human-readable erased description of a type or member.- Specified by:
getErasedDescription
in interfaceIMemberDefinition
-
getSimpleDescription
public 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.- Specified by:
getSimpleDescription
in interfaceIMemberDefinition
-
appendName
protected java.lang.StringBuilder appendName(java.lang.StringBuilder sb, boolean fullName, boolean dottedName)
- Specified by:
appendName
in classFieldReference
-
appendDescription
protected java.lang.StringBuilder appendDescription(java.lang.StringBuilder sb)
-
appendBriefDescription
protected java.lang.StringBuilder appendBriefDescription(java.lang.StringBuilder sb)
-
appendErasedDescription
protected java.lang.StringBuilder appendErasedDescription(java.lang.StringBuilder sb)
-
appendSimpleDescription
protected java.lang.StringBuilder appendSimpleDescription(java.lang.StringBuilder sb)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classMemberReference
-
-