|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.BugAnnotationWithSourceLines
edu.umd.cs.findbugs.PackageMemberAnnotation
edu.umd.cs.findbugs.FieldAnnotation
public class FieldAnnotation
A BugAnnotation specifying a particular field in particular class.
BugAnnotation
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
ARGUMENT_ROLE
|
static java.lang.String |
DEFAULT_ROLE
|
static java.lang.String |
DID_YOU_MEAN_ROLE
|
static java.lang.String |
INVOKED_ON_ROLE
|
static java.lang.String |
LOADED_FROM_ROLE
|
static java.lang.String |
STORED_ROLE
|
static java.lang.String |
VALUE_OF_ROLE
|
Fields inherited from class edu.umd.cs.findbugs.PackageMemberAnnotation |
---|
className, description |
Fields inherited from class edu.umd.cs.findbugs.BugAnnotationWithSourceLines |
---|
sourceFileName, sourceLines |
Fields inherited from interface edu.umd.cs.findbugs.BugAnnotation |
---|
MESSAGE_TAG |
Constructor Summary | |
---|---|
FieldAnnotation(java.lang.String className,
java.lang.String fieldName,
java.lang.String fieldSig,
boolean isStatic)
Constructor. |
|
FieldAnnotation(java.lang.String className,
java.lang.String fieldName,
java.lang.String fieldSig,
int accessFlags)
Constructor. |
|
FieldAnnotation(java.lang.String className,
java.lang.String fieldName,
java.lang.String fieldSig,
java.lang.String fieldSourceSig,
boolean isStatic)
|
Method Summary | |
---|---|
void |
accept(BugAnnotationVisitor visitor)
Accept a BugAnnotationVisitor. |
int |
compareTo(BugAnnotation o)
|
boolean |
equals(java.lang.Object o)
|
protected java.lang.String |
formatPackageMember(java.lang.String key,
ClassAnnotation primaryClass)
Do default and subclass-specific formatting. |
static FieldAnnotation |
fromBCELField(org.apache.bcel.classfile.JavaClass jClass,
org.apache.bcel.classfile.Field field)
Factory method. |
static FieldAnnotation |
fromBCELField(java.lang.String className,
org.apache.bcel.classfile.Field field)
Factory method. |
static FieldAnnotation |
fromFieldDescriptor(FieldDescriptor fieldDescriptor)
Factory method. |
static FieldAnnotation |
fromReferencedField(DismantleBytecode visitor)
Factory method. |
static FieldAnnotation |
fromVisitedField(PreorderVisitor visitor)
Factory method. |
static FieldAnnotation |
fromXField(XField fieldDescriptor)
|
java.lang.String |
getFieldName()
Get the field name. |
java.lang.String |
getFieldSignature()
Get the type signature of the field. |
SourceLineAnnotation |
getSourceLines()
Get the SourceLineAnnotation describing the source lines where the method is defined. |
int |
hashCode()
|
static FieldAnnotation |
isRead(org.apache.bcel.generic.Instruction ins,
org.apache.bcel.generic.ConstantPoolGen cpg)
Is the given instruction a read of a field? |
boolean |
isStatic()
Return whether or not the field is static. |
static FieldAnnotation |
isWrite(org.apache.bcel.generic.Instruction ins,
org.apache.bcel.generic.ConstantPoolGen cpg)
Is the instruction a write of a field? |
void |
writeXML(XMLOutput xmlOutput)
Write this object to given XMLOutput. |
void |
writeXML(XMLOutput xmlOutput,
boolean addMessages,
boolean isPrimary)
|
Methods inherited from class edu.umd.cs.findbugs.PackageMemberAnnotation |
---|
format, getClassDescriptor, getClassName, getDescription, getPackageName, isSignificant, removePackage, removePackageName, setDescription, shorten, toString, toString |
Methods inherited from class edu.umd.cs.findbugs.BugAnnotationWithSourceLines |
---|
clone, getSourceFileName, setSourceLines |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_ROLE
public static final java.lang.String DID_YOU_MEAN_ROLE
public static final java.lang.String VALUE_OF_ROLE
public static final java.lang.String LOADED_FROM_ROLE
public static final java.lang.String STORED_ROLE
public static final java.lang.String INVOKED_ON_ROLE
public static final java.lang.String ARGUMENT_ROLE
Constructor Detail |
---|
public FieldAnnotation(@DottedClassName java.lang.String className, java.lang.String fieldName, java.lang.String fieldSig, boolean isStatic)
className
- the name of the class containing the fieldfieldName
- the name of the fieldfieldSig
- the type signature of the fieldpublic FieldAnnotation(@DottedClassName java.lang.String className, java.lang.String fieldName, java.lang.String fieldSig, java.lang.String fieldSourceSig, boolean isStatic)
public FieldAnnotation(@DottedClassName java.lang.String className, java.lang.String fieldName, java.lang.String fieldSig, int accessFlags)
className
- the name of the class containing the fieldfieldName
- the name of the fieldfieldSig
- the type signature of the fieldaccessFlags
- accessFlags for the fieldMethod Detail |
---|
public static FieldAnnotation fromVisitedField(PreorderVisitor visitor)
visitor
- the visitor which is visiting the field
public static FieldAnnotation fromReferencedField(DismantleBytecode visitor)
visitor
- the visitor which is visiting the field reference
public static FieldAnnotation fromBCELField(@DottedClassName java.lang.String className, org.apache.bcel.classfile.Field field)
className
- the name of the class which defines the fieldfield
- the BCEL Field object
public static FieldAnnotation fromBCELField(org.apache.bcel.classfile.JavaClass jClass, org.apache.bcel.classfile.Field field)
jClass
- the class which defines the fieldfield
- the BCEL Field object
public static FieldAnnotation fromFieldDescriptor(FieldDescriptor fieldDescriptor)
fieldDescriptor
- the FieldDescriptor
public static FieldAnnotation fromXField(XField fieldDescriptor)
public java.lang.String getFieldName()
public java.lang.String getFieldSignature()
public boolean isStatic()
public static FieldAnnotation isRead(org.apache.bcel.generic.Instruction ins, org.apache.bcel.generic.ConstantPoolGen cpg)
ins
- the Instruction to checkcpg
- ConstantPoolGen of the method containing the instruction
public static FieldAnnotation isWrite(org.apache.bcel.generic.Instruction ins, org.apache.bcel.generic.ConstantPoolGen cpg)
ins
- the Instruction to checkcpg
- ConstantPoolGen of the method containing the instruction
public void accept(BugAnnotationVisitor visitor)
BugAnnotation
visitor
- the visitor to acceptprotected java.lang.String formatPackageMember(java.lang.String key, ClassAnnotation primaryClass)
PackageMemberAnnotation
formatPackageMember
in class PackageMemberAnnotation
key
- the key specifying how to do the formattingprimaryClass
- TODOpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int compareTo(BugAnnotation o)
public SourceLineAnnotation getSourceLines()
BugAnnotationWithSourceLines
getSourceLines
in class BugAnnotationWithSourceLines
public void writeXML(XMLOutput xmlOutput) throws java.io.IOException
XMLWriteable
xmlOutput
- the XMLOutput for the document
java.io.IOException
public void writeXML(XMLOutput xmlOutput, boolean addMessages, boolean isPrimary) throws java.io.IOException
java.io.IOException
|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |