edu.umd.cs.findbugs.ba

Class XFactory

public class XFactory extends Object

Factory methods for creating XMethod objects.

Author: David Hovemeyer

Field Summary
static booleanDEBUG_CIRCULARITY
Constructor Summary
XFactory()
Method Summary
voidaddCalledMethod(XMethod m)
static StringcanonicalizeString(String s)
static XFieldcreateReferencedXField(DismantleBytecode visitor)
static XMethodcreateReferencedXMethod(DismantleBytecode visitor)
static XFieldcreateXField(String className, String fieldName, String fieldSignature, boolean isStatic)
Create an XField object
static XFieldcreateXField(FieldInstruction fieldInstruction, ConstantPoolGen cpg)
static XFieldcreateXField(FieldAnnotation f)
static XFieldcreateXField(JavaClass javaClass, Field field)
static XFieldcreateXField(String className, Field field)
Create an XField object from a BCEL Field.
static XFieldcreateXField(String className, String fieldName, String fieldSig, int accessFlags)
static XFieldcreateXField(PreorderVisitor visitor)
Create an XField object from the field currently being visited by the given PreorderVisitor.
static XMethodcreateXMethod(String className, Method method)
Create an XMethod object from a BCEL Method.
static XMethodcreateXMethod(String className, String methodName, String methodSig, int accessFlags)
static XMethodcreateXMethod(JavaClass javaClass, Method method)
Create an XMethod object from a BCEL Method.
static XMethodcreateXMethod(String className, String methodName, String methodSig, boolean isStatic)
static XMethodcreateXMethod(MethodAnnotation ma)
static XMethodcreateXMethod(InvokeInstruction invokeInstruction, ConstantPoolGen cpg)
Create an XMethod object from an InvokeInstruction.
static XMethodcreateXMethod(PreorderVisitor visitor)
Create an XMethod object from the method currently being visited by the given PreorderVisitor.
static XMethodcreateXMethod(MethodGen methodGen)
static XMethodcreateXMethod(JavaClassAndMethod classAndMethod)
voiddeprecate(ClassMember m)
Set<? extends ClassMember>getDeprecated()
Set<XField>getFields()
Set<XMethod>getMethods()
booleanisCalled(XMethod m)
booleanisInterned(XMethod m)

Field Detail

DEBUG_CIRCULARITY

public static final boolean DEBUG_CIRCULARITY

Constructor Detail

XFactory

public XFactory()

Method Detail

addCalledMethod

public void addCalledMethod(XMethod m)

canonicalizeString

public static String canonicalizeString(String s)

createReferencedXField

public static XField createReferencedXField(DismantleBytecode visitor)

createReferencedXMethod

public static XMethod createReferencedXMethod(DismantleBytecode visitor)

createXField

public static XField createXField(String className, String fieldName, String fieldSignature, boolean isStatic)
Create an XField object

Parameters: className fieldName fieldSignature isStatic

Returns: the created XField

createXField

public static XField createXField(FieldInstruction fieldInstruction, ConstantPoolGen cpg)

createXField

public static XField createXField(FieldAnnotation f)

createXField

public static XField createXField(JavaClass javaClass, Field field)

createXField

public static XField createXField(String className, Field field)
Create an XField object from a BCEL Field.

Parameters: className the name of the Java class containing the field field the Field within the JavaClass

Returns: the created XField

createXField

public static XField createXField(String className, String fieldName, String fieldSig, int accessFlags)

createXField

public static XField createXField(PreorderVisitor visitor)
Create an XField object from the field currently being visited by the given PreorderVisitor.

Parameters: visitor the PreorderVisitor

Returns: the XField representing the method currently being visited

createXMethod

public static XMethod createXMethod(String className, Method method)
Create an XMethod object from a BCEL Method.

Parameters: className the class to which the Method belongs method the Method

Returns: an XMethod representing the Method

createXMethod

public static XMethod createXMethod(String className, String methodName, String methodSig, int accessFlags)

createXMethod

public static XMethod createXMethod(JavaClass javaClass, Method method)
Create an XMethod object from a BCEL Method.

Parameters: javaClass the class to which the Method belongs method the Method

Returns: an XMethod representing the Method

createXMethod

public static XMethod createXMethod(String className, String methodName, String methodSig, boolean isStatic)

Parameters: className methodName methodSig isStatic

Returns: the created XMethod

createXMethod

public static XMethod createXMethod(MethodAnnotation ma)

createXMethod

public static XMethod createXMethod(InvokeInstruction invokeInstruction, ConstantPoolGen cpg)
Create an XMethod object from an InvokeInstruction.

Parameters: invokeInstruction the InvokeInstruction cpg ConstantPoolGen from the class containing the instruction

Returns: XMethod representing the method called by the InvokeInstruction

createXMethod

public static XMethod createXMethod(PreorderVisitor visitor)
Create an XMethod object from the method currently being visited by the given PreorderVisitor.

Parameters: visitor the PreorderVisitor

Returns: the XMethod representing the method currently being visited

createXMethod

public static XMethod createXMethod(MethodGen methodGen)

createXMethod

public static XMethod createXMethod(JavaClassAndMethod classAndMethod)

deprecate

public void deprecate(ClassMember m)

Parameters: m

getDeprecated

public Set<? extends ClassMember> getDeprecated()

getFields

public Set<XField> getFields()

getMethods

public Set<XMethod> getMethods()

isCalled

public boolean isCalled(XMethod m)

isInterned

public boolean isInterned(XMethod m)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.