|
||||||||||
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
,
Serialized FormField Summary |
---|
Fields inherited from class edu.umd.cs.findbugs.PackageMemberAnnotation |
---|
className, description, 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. |
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. |
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)
|
Methods inherited from class edu.umd.cs.findbugs.PackageMemberAnnotation |
---|
clone, format, getClassName, getDescription, getPackageName, getSourceFileName, setDescription, setSourceLines, shorten, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
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 SourceLineAnnotation getSourceLines()
PackageMemberAnnotation
getSourceLines
in class PackageMemberAnnotation
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) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |