edu.umd.cs.findbugs
public class MethodAnnotation extends PackageMemberAnnotation
See Also: BugAnnotation
Field Summary | |
---|---|
static String | METHOD_DANGEROUS_TARGET |
static String | METHOD_DANGEROUS_TARGET_ACTUAL_GUARANTEED_NULL |
static String | METHOD_SAFE_TARGET |
Constructor Summary | |
---|---|
MethodAnnotation(String className, String methodName, String methodSig, boolean isStatic)
Constructor.
|
Method Summary | |
---|---|
void | accept(BugAnnotationVisitor visitor) |
int | compareTo(BugAnnotation o) |
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(String className, String methodName, String methodSig, boolean isStatic)
Create a MethodAnnotation from a method that is not
directly accessible. |
static MethodAnnotation | fromForeignMethod(String className, String methodName, String methodSig, int accessFlags)
Factory method to create the MethodAnnotation from
the classname, method name, signature, etc.
|
static MethodAnnotation | fromForeignMethod(String className, String methodName, String methodSig, boolean isStatic)
Factory method to create the MethodAnnotation from
the classname, method name, signature, etc.
|
static BugAnnotation | fromMethodDescriptor(MethodDescriptor methodDescriptor)
Create a MethodAnnotation from a MethodDescriptor.
|
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.
|
String | getFullMethod(ClassAnnotation primaryClass)
Get the "full" method name.
|
String | getJavaSourceMethodName() |
String | getMethodName()
Get the method name. |
String | getMethodSignature()
Get the method type signature. |
String | getNameInClass(ClassAnnotation primaryClass)
Get the "full" method name.
|
String | getNameInClass(boolean shortenPackages, boolean useJVMMethodName, boolean hash)
Get the "full" method name.
|
boolean | isStatic()
Return whether or not the method is static.
|
XMethod | toXMethod()
Convert to an XMethod.
|
void | writeXML(XMLOutput xmlOutput) |
void | writeXML(XMLOutput xmlOutput, boolean addMessages) |
Parameters: className the name of the class containing the method methodName the name of the method methodSig the Java type signature of the method isStatic true if the method is static, false if not
Parameters: visitor the visitor
Returns: the MethodAnnotation representing the called method
Parameters: className class containing called method methodName name of called method methodSig signature of called method isStatic true if called method is static
Returns: the MethodAnnotation for the called method
Parameters: className name of the class containing the method methodName name of the method methodSig signature of the method isStatic true if the method is static, false otherwise
Returns: the MethodAnnotation
Parameters: className name of the class containing the method methodName name of the method methodSig signature of the method isStatic true if the method is static, false otherwise
Returns: the MethodAnnotation
Parameters: methodDescriptor the MethodDescriptor
Returns: the MethodAnnotation
Parameters: visitor the BetterVisitor currently visiting the method
Parameters: xmethod the XMethod
Returns: the MethodAnnotation
Parameters: primaryClass TODO
Parameters: primaryClass TODO
Parameters: shortenPackages whether to shorten package names if they are in java or in the same package as this method. useJVMMethodName TODO hash TODO
Returns: true if the method is static, false otherwise
Returns: an XMethod specifying the same method as this MethodAnnotation