edu.umd.cs.findbugs
public class FieldAnnotation extends PackageMemberAnnotation
See Also: BugAnnotation
| Constructor Summary | |
|---|---|
| FieldAnnotation(String className, String fieldName, String fieldSig, boolean isStatic)
Constructor.
| |
| FieldAnnotation(String className, String fieldName, String fieldSig, int accessFlags)
Constructor.
| |
| Method Summary | |
|---|---|
| void | accept(BugAnnotationVisitor visitor) |
| int | compareTo(BugAnnotation o) |
| static FieldAnnotation | fromBCELField(String className, 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) |
| String | getFieldName()
Get the field name. |
| String | getFieldSignature()
Get the type signature of the field. |
| static FieldAnnotation | isRead(Instruction ins, ConstantPoolGen cpg)
Is the given instruction a read of a field?
|
| boolean | isStatic()
Return whether or not the field is static. |
| static FieldAnnotation | isWrite(Instruction ins, ConstantPoolGen cpg)
Is the instruction a write of a field?
|
| void | writeXML(XMLOutput xmlOutput) |
| void | writeXML(XMLOutput xmlOutput, boolean addMessages) |
Parameters: className the name of the class containing the field fieldName the name of the field fieldSig the type signature of the field
Parameters: className the name of the class containing the field fieldName the name of the field fieldSig the type signature of the field accessFlags accessFlags for the field
Parameters: className the name of the class which defines the field field the BCEL Field object
Returns: the FieldAnnotation
Parameters: fieldDescriptor the FieldDescriptor
Returns: the FieldAnnotation
Parameters: visitor the visitor which is visiting the field reference
Returns: the FieldAnnotation object
Parameters: visitor the visitor which is visiting the field
Returns: the FieldAnnotation object
Parameters: ins the Instruction to check cpg ConstantPoolGen of the method containing the instruction
Returns: the Field if the instruction is a read of a field, null otherwise
Parameters: ins the Instruction to check cpg ConstantPoolGen of the method containing the instruction
Returns: the Field if instruction is a write of a field, null otherwise