|
|||||||||
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.MethodAnnotation
public class MethodAnnotation
A BugAnnotation specifying a particular method in a particular class. A MethodAnnotation may (optionally) have a SourceLineAnnotation directly embedded inside it to indicate the range of source lines where the method is defined.
BugAnnotation
Field Summary | |
---|---|
private static java.lang.String |
DEFAULT_ROLE
|
private static java.lang.String |
ELEMENT_NAME
|
private java.lang.String |
fullMethod
|
private java.lang.String |
methodName
|
private java.lang.String |
methodSig
|
private SourceLineAnnotation |
sourceLines
|
private static boolean |
UGLY_METHODS
|
Fields inherited from class edu.umd.cs.findbugs.PackageMemberAnnotation |
---|
className, description |
Constructor Summary | |
---|---|
MethodAnnotation(java.lang.String className,
java.lang.String methodName,
java.lang.String methodSig)
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 MethodAnnotation |
fromVisitedMethod(PreorderVisitor visitor)
Factory method to create a MethodAnnotation from the method the given visitor is currently visiting. |
java.lang.String |
getFullMethod()
Get the "full" method name. |
java.lang.String |
getMethodName()
Get the method name. |
java.lang.String |
getMethodSignature()
Get the method type signature. |
SourceLineAnnotation |
getSourceLines()
Get the SourceLineAnnotation describing the source lines where the method is defined. |
private java.lang.String |
getUglyMethod()
|
int |
hashCode()
|
void |
setSourceLines(SourceLineAnnotation sourceLines)
Set a SourceLineAnnotation describing the source lines where the method is defined. |
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 boolean UGLY_METHODS
private static final java.lang.String DEFAULT_ROLE
private java.lang.String methodName
private java.lang.String methodSig
private java.lang.String fullMethod
private SourceLineAnnotation sourceLines
private static final java.lang.String ELEMENT_NAME
Constructor Detail |
---|
public MethodAnnotation(java.lang.String className, java.lang.String methodName, java.lang.String methodSig)
className
- the name of the class containing the methodmethodName
- the name of the methodmethodSig
- the Java type signature of the methodMethod Detail |
---|
public static MethodAnnotation fromVisitedMethod(PreorderVisitor visitor)
visitor
- the BetterVisitor currently visiting the methodpublic java.lang.String getMethodName()
public java.lang.String getMethodSignature()
public void setSourceLines(SourceLineAnnotation sourceLines)
public SourceLineAnnotation getSourceLines()
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 java.lang.String getFullMethod()
private java.lang.String getUglyMethod()
public 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 |