|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.PackageMemberAnnotation
edu.umd.cs.findbugs.FieldAnnotation
public class FieldAnnotation
A BugAnnotation specifying a particular field in particular class.
BugAnnotation
Field Summary | |
---|---|
private static java.lang.String |
DEFAULT_ROLE
|
private static java.lang.String |
ELEMENT_NAME
|
private java.lang.String |
fieldName
|
private java.lang.String |
fieldSig
|
private boolean |
isStatic
|
Fields inherited from class edu.umd.cs.findbugs.PackageMemberAnnotation |
---|
className, description |
Constructor Summary | |
---|---|
FieldAnnotation(java.lang.String className,
java.lang.String fieldName,
java.lang.String fieldSig,
boolean isStatic)
Constructor. |
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)
Do default and subclass-specific formatting. |
static FieldAnnotation |
fromBCELField(java.lang.String className,
org.apache.bcel.classfile.Field field)
Factory method. |
static FieldAnnotation |
fromReferencedField(DismantleBytecode visitor)
Factory method. |
static FieldAnnotation |
fromVisitedField(PreorderVisitor visitor)
Factory method. |
java.lang.String |
getFieldName()
Get the field name. |
java.lang.String |
getFieldSignature()
Get the type signature of the field. |
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. |
Methods inherited from class edu.umd.cs.findbugs.PackageMemberAnnotation |
---|
format, getClassName, getDescription, getPackageName, setDescription, shorten, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String DEFAULT_ROLE
private java.lang.String fieldName
private java.lang.String fieldSig
private boolean isStatic
private static final java.lang.String ELEMENT_NAME
Constructor Detail |
---|
public FieldAnnotation(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 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(java.lang.String className, org.apache.bcel.classfile.Field field)
className
- the name of the class which defines the fieldfield
- the BCEL Field objectpublic 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)
PackageMemberAnnotation
formatPackageMember
in class PackageMemberAnnotation
key
- the key specifying how to do the formattingpublic 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 void writeXML(XMLOutput xmlOutput) throws java.io.IOException
XMLWriteable
xmlOutput
- the XMLOutput for the document
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |