public class FieldInfo extends FieldDescriptor implements XField
Modifier and Type | Class and Description |
---|---|
static class |
FieldInfo.Builder |
Modifier and Type | Field and Description |
---|---|
static FieldInfo[] |
EMPTY_ARRAY |
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(AnnotationValue annotationValue)
Destructively add an annotation.
|
int |
compareTo(ComparableField rhs) |
static FieldInfo |
createUnresolvedFieldInfo(java.lang.String className,
java.lang.String name,
java.lang.String signature,
boolean isStatic)
Create a FieldInfo object to represent an unresolved field.
|
int |
getAccessFlags()
Get the entity's access flags.
|
AnnotationValue |
getAnnotation(ClassDescriptor desc) |
java.util.Collection<ClassDescriptor> |
getAnnotationDescriptors() |
java.util.Collection<AnnotationValue> |
getAnnotations() |
java.lang.String |
getClassName()
Get the full (dotted) name of the class (if the object represents a
class) or the class the entity is defined in (if a field or method).
|
AnnotatedObject |
getContainingScope() |
java.lang.annotation.ElementType |
getElementType() |
FieldDescriptor |
getFieldDescriptor() |
int |
getNumParams() |
java.lang.String |
getPackageName()
Get the (dotted) name of the package in which the entity is defined.
|
java.lang.String |
getSourceSignature()
Get the signature representing the field/method's type, including generic
type
|
boolean |
isDeprecated()
Is the entity deprecated?
|
boolean |
isFinal()
Is the entity final?
|
boolean |
isNative() |
boolean |
isPrivate()
Is the entity private?
|
boolean |
isProtected()
Is the entity protected?
|
boolean |
isPublic()
Is the entity public?
|
boolean |
isReferenceType()
Is the type of the field a reference type?
|
boolean |
isResolved()
Did we find a declaration of this entity?
|
boolean |
isSynchronized() |
boolean |
isSynthetic()
Is the entity synthetic?
|
boolean |
isVolatile()
Is this a volatile field?
|
equals, toString
compareTo, compareTo, getClassDescriptor, getName, getNameSigHashCode, getNameSigHashCode, getSignature, getSlashedClassName, hashCode, haveEqualFields, isStatic
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getName, getSignature
getClassDescriptor, isStatic
getClassDescriptor, isStatic
getClassDescriptor
public static final FieldInfo[] EMPTY_ARRAY
public int getNumParams()
public boolean isNative()
public boolean isSynchronized()
public boolean isDeprecated()
AccessibleEntity
isDeprecated
in interface AccessibleEntity
@DottedClassName public java.lang.String getClassName()
ClassMember
getClassName
in interface ClassMember
@DottedClassName public java.lang.String getPackageName()
ClassMember
getPackageName
in interface ClassMember
public java.lang.String getSourceSignature()
ClassMember
getSourceSignature
in interface ClassMember
public int compareTo(ComparableField rhs)
compareTo
in interface java.lang.Comparable<ComparableField>
compareTo
in class FieldDescriptor
public int getAccessFlags()
AccessibleEntity
getAccessFlags
in interface AccessibleEntity
public boolean isFinal()
AccessibleEntity
isFinal
in interface AccessibleEntity
public boolean isPrivate()
AccessibleEntity
isPrivate
in interface AccessibleEntity
public boolean isProtected()
AccessibleEntity
isProtected
in interface AccessibleEntity
public boolean isPublic()
AccessibleEntity
isPublic
in interface AccessibleEntity
public boolean isResolved()
ClassMember
isResolved
in interface ClassMember
public boolean isReferenceType()
XField
isReferenceType
in interface XField
public boolean isVolatile()
XField
isVolatile
in interface XField
public boolean isSynthetic()
AccessibleEntity
isSynthetic
in interface AccessibleEntity
isSynthetic
in interface AnnotatedObject
public java.util.Collection<ClassDescriptor> getAnnotationDescriptors()
getAnnotationDescriptors
in interface AnnotatedObject
public AnnotationValue getAnnotation(ClassDescriptor desc)
getAnnotation
in interface AnnotatedObject
public java.util.Collection<AnnotationValue> getAnnotations()
getAnnotations
in interface AnnotatedObject
public void addAnnotation(AnnotationValue annotationValue)
annotationValue
- an AnnotationValue representing a field annotationpublic FieldDescriptor getFieldDescriptor()
getFieldDescriptor
in interface XField
public static FieldInfo createUnresolvedFieldInfo(java.lang.String className, java.lang.String name, java.lang.String signature, boolean isStatic)
className
- name of class containing the fieldname
- name of fieldsignature
- field signatureisStatic
- true if field is static, false otherwisepublic java.lang.annotation.ElementType getElementType()
getElementType
in interface AnnotatedObject
@CheckForNull public AnnotatedObject getContainingScope()
getContainingScope
in interface AnnotatedObject
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.