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_constantValueprivate Collection<CustomAnnotation>_customAnnotationsprivate java.util.List<CustomAnnotation>_customAnnotationsViewprivate TypeDefinition_declaringTypeprivate TypeReference_fieldTypeprivate long_flagsprivate java.lang.String_nameprivate Collection<SourceAttribute>_sourceAttributesprivate java.util.List<SourceAttribute>_sourceAttributesView
-
Constructor Summary
Constructors Modifier Constructor Description protectedFieldDefinition(TypeReference fieldType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringBuilderappendBriefDescription(java.lang.StringBuilder sb)protected java.lang.StringBuilderappendDescription(java.lang.StringBuilder sb)protected java.lang.StringBuilderappendErasedDescription(java.lang.StringBuilder sb)protected java.lang.StringBuilderappendName(java.lang.StringBuilder sb, boolean fullName, boolean dottedName)protected java.lang.StringBuilderappendSimpleDescription(java.lang.StringBuilder sb)booleanequals(java.lang.Object obj)java.util.List<CustomAnnotation>getAnnotations()protected Collection<CustomAnnotation>getAnnotationsInternal()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'.java.lang.ObjectgetConstantValue()TypeDefinitiongetDeclaringType()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.TypeReferencegetFieldType()longgetFlags()intgetModifiers()java.lang.StringgetName()java.lang.StringgetSimpleDescription()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()booleanhasConstantValue()inthashCode()booleanisDefinition()booleanisDeprecated()booleanisEnumConstant()booleanisFinal()booleanisNonPublic()booleanisPackagePrivate()booleanisPrivate()booleanisProtected()booleanisPublic()booleanisStatic()booleanisSynthetic()protected voidsetConstantValue(java.lang.Object constantValue)protected voidsetDeclaringType(TypeDefinition declaringType)protected voidsetFieldType(TypeReference fieldType)protected voidsetFlags(long flags)protected voidsetName(java.lang.String name)java.lang.StringtoString()private booleantypeNamesMatch(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:
getAnnotationsin interfaceIAnnotationsProvider- Overrides:
getAnnotationsin 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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
typeNamesMatch
private boolean typeNamesMatch(TypeReference t1, TypeReference t2)
-
isEnumConstant
public final boolean isEnumConstant()
-
hasConstantValue
public final boolean hasConstantValue()
- Specified by:
hasConstantValuein interfaceIConstantValueProvider
-
getConstantValue
public final java.lang.Object getConstantValue()
- Specified by:
getConstantValuein interfaceIConstantValueProvider
-
getFieldType
public final TypeReference getFieldType()
- Specified by:
getFieldTypein 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:
getNamein interfaceIMemberDefinition- Specified by:
getNamein interfaceIMetadataTypeMember- Specified by:
getNamein classMemberReference
-
setName
protected final void setName(java.lang.String name)
-
isDefinition
public final boolean isDefinition()
- Overrides:
isDefinitionin classMemberReference
-
getDeclaringType
public final TypeDefinition getDeclaringType()
- Specified by:
getDeclaringTypein interfaceIMemberDefinition- Specified by:
getDeclaringTypein interfaceIMetadataTypeMember- Specified by:
getDeclaringTypein classMemberReference
-
setDeclaringType
protected final void setDeclaringType(TypeDefinition declaringType)
-
getFlags
public final long getFlags()
- Specified by:
getFlagsin interfaceIMemberDefinition
-
setFlags
protected final void setFlags(long flags)
-
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
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:
getBriefDescriptionin 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:
getDescriptionin interfaceIMemberDefinition
-
getErasedDescription
public java.lang.String getErasedDescription()
Human-readable erased description of a type or member.- Specified by:
getErasedDescriptionin 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:
getSimpleDescriptionin interfaceIMemberDefinition
-
appendName
protected java.lang.StringBuilder appendName(java.lang.StringBuilder sb, boolean fullName, boolean dottedName)- Specified by:
appendNamein 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:
toStringin classMemberReference
-
-