|
||||||||||
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
,
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 | |
---|---|
MethodAnnotation(java.lang.String className,
java.lang.String methodName,
java.lang.String methodSig,
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 MethodAnnotation |
fromCalledMethod(DismantleBytecode visitor)
Factory method to create a MethodAnnotation from a method called by the instruction the given visitor is currently visiting. |
static MethodAnnotation |
fromCalledMethod(java.lang.String className,
java.lang.String methodName,
java.lang.String methodSig,
boolean isStatic)
Create a MethodAnnotation from a method that is not directly accessible. |
static MethodAnnotation |
fromForeignMethod(java.lang.String className,
java.lang.String methodName,
java.lang.String methodSig,
boolean isStatic)
|
static MethodAnnotation |
fromVisitedMethod(PreorderVisitor visitor)
Factory method to create a MethodAnnotation from the method the given visitor is currently visiting. |
static MethodAnnotation |
fromXMethod(XMethod xmethod)
Create a MethodAnnotation from an XMethod. |
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. |
java.lang.String |
getNameInClass()
Get the "full" method name. |
int |
hashCode()
|
boolean |
isStatic()
Return whether or not the method is static. |
XMethod |
toXMethod()
Convert to an XMethod. |
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, getSourceLines, setDescription, setSourceLines, shorten, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MethodAnnotation(java.lang.String className, java.lang.String methodName, java.lang.String methodSig, boolean isStatic)
className
- the name of the class containing the methodmethodName
- the name of the methodmethodSig
- the Java type signature of the methodisStatic
- true if the method is static, false if notMethod Detail |
---|
public static MethodAnnotation fromVisitedMethod(PreorderVisitor visitor)
visitor
- the BetterVisitor currently visiting the methodpublic static MethodAnnotation fromCalledMethod(DismantleBytecode visitor)
visitor
- the visitor
public static MethodAnnotation fromForeignMethod(java.lang.String className, java.lang.String methodName, java.lang.String methodSig, boolean isStatic)
public static MethodAnnotation fromCalledMethod(java.lang.String className, java.lang.String methodName, java.lang.String methodSig, boolean isStatic)
className
- class containing called methodmethodName
- name of called methodmethodSig
- signature of called methodisStatic
- true if called method is static
public static MethodAnnotation fromXMethod(XMethod xmethod)
xmethod
- the XMethod
public java.lang.String getMethodName()
public java.lang.String getMethodSignature()
public boolean isStatic()
public XMethod toXMethod()
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 getNameInClass()
public java.lang.String getFullMethod()
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
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 |