public class XFactory
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG_CIRCULARITY |
static boolean |
DEBUG_UNRESOLVED |
Constructor and Description |
---|
XFactory()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addCalledMethod(MethodDescriptor m) |
void |
addEmptyArrayField(XField f) |
void |
addFunctionThatMightBeMistakenForProcedures(MethodDescriptor m) |
boolean |
addReflectiveClasses(ClassDescriptor c) |
java.util.Collection<XField> |
allFields() |
static void |
assertDottedClassName(java.lang.String className) |
static void |
assertSlashedClassName(java.lang.String className) |
void |
canonicalizeAll() |
static java.lang.String |
canonicalizeString(java.lang.String s) |
static <E extends ClassMember> |
compare(E lhs,
E rhs)
Compare XMethod or XField object objects.
|
static XField |
createReferencedXField(DismantleBytecode visitor) |
static XMethod |
createReferencedXMethod(DismantleBytecode visitor) |
static XField |
createXField(FieldAnnotation f) |
static XField |
createXField(FieldDescriptor desc) |
static XField |
createXField(org.apache.bcel.generic.FieldInstruction fieldInstruction,
org.apache.bcel.generic.ConstantPoolGen cpg) |
static XField |
createXField(org.apache.bcel.classfile.JavaClass javaClass,
org.apache.bcel.classfile.Field field) |
static XField |
createXField(PreorderVisitor visitor)
Create an XField object from the field currently being visited by the
given PreorderVisitor.
|
static XField |
createXField(java.lang.String className,
org.apache.bcel.classfile.Field field)
Create an XField object from a BCEL Field.
|
static XField |
createXField(java.lang.String className,
java.lang.String fieldName,
java.lang.String fieldSignature,
boolean isStatic)
Create an XField object
|
static XField |
createXFieldUsingSlashedClassName(java.lang.String className,
java.lang.String fieldName,
java.lang.String fieldSignature,
boolean isStatic)
Create an XField object
|
static XMethod |
createXMethod(org.apache.bcel.generic.InvokeInstruction invokeInstruction,
org.apache.bcel.generic.ConstantPoolGen cpg)
Create an XMethod object from an InvokeInstruction.
|
static XMethod |
createXMethod(JavaClassAndMethod classAndMethod) |
static XMethod |
createXMethod(org.apache.bcel.classfile.JavaClass javaClass,
org.apache.bcel.classfile.Method method)
Create an XMethod object from a BCEL Method.
|
static XMethod |
createXMethod(MethodAnnotation ma) |
static XMethod |
createXMethod(MethodDescriptor desc) |
static XMethod |
createXMethod(org.apache.bcel.generic.MethodGen methodGen) |
static XMethod |
createXMethod(PreorderVisitor visitor)
Create an XMethod object from the method currently being visited by the
given PreorderVisitor.
|
static XMethod |
createXMethod(java.lang.String className,
org.apache.bcel.classfile.Method method)
Create an XMethod object from a BCEL Method.
|
static XMethod |
createXMethod(java.lang.String className,
java.lang.String methodName,
java.lang.String methodSig,
boolean isStatic) |
static XMethod |
createXMethodUsingSlashedClassName(java.lang.String className,
java.lang.String methodName,
java.lang.String methodSig,
boolean isStatic) |
java.util.Set<XMethod> |
getCalledMethods() |
static XField |
getExactXField(FieldDescriptor desc) |
static XField |
getExactXField(java.lang.String className,
org.apache.bcel.classfile.Field f) |
static XField |
getExactXField(java.lang.String className,
java.lang.String name,
java.lang.String signature,
boolean isStatic)
Get an XField object exactly matching given class, name, and signature.
|
java.util.Set<ClassDescriptor> |
getReflectiveClasses() |
XClass |
getXClass(ClassDescriptor classDescriptor)
Get the XClass object providing information about the class named by the
given ClassDescriptor.
|
void |
intern(XClass c) |
boolean |
isCalled(XMethod m) |
boolean |
isCalledDirectlyOrIndirectly(XMethod m) |
boolean |
isEmptyArrayField(XField f) |
boolean |
isFunctionshatMightBeMistakenForProcedures(MethodDescriptor m) |
boolean |
isInterned(XMethod m)
Deprecated.
|
boolean |
isReflectiveClass(ClassDescriptor c) |
boolean |
nameAndSignatureIsCalled(XMethod m) |
static void |
profile() |
public static final boolean DEBUG_UNRESOLVED
public static final boolean DEBUG_CIRCULARITY
public void canonicalizeAll()
public void intern(XClass c)
public java.util.Collection<XField> allFields()
public void addCalledMethod(MethodDescriptor m)
public void addEmptyArrayField(XField f)
public boolean isEmptyArrayField(@CheckForNull XField f)
public boolean isCalled(XMethod m)
public java.util.Set<XMethod> getCalledMethods()
public void addFunctionThatMightBeMistakenForProcedures(MethodDescriptor m)
public boolean isFunctionshatMightBeMistakenForProcedures(MethodDescriptor m)
public java.util.Set<ClassDescriptor> getReflectiveClasses()
public boolean isReflectiveClass(ClassDescriptor c)
public boolean addReflectiveClasses(ClassDescriptor c)
public boolean isCalledDirectlyOrIndirectly(XMethod m)
public boolean nameAndSignatureIsCalled(XMethod m)
@Deprecated public boolean isInterned(XMethod m)
public static java.lang.String canonicalizeString(java.lang.String s)
public static XMethod createXMethod(java.lang.String className, org.apache.bcel.classfile.Method method)
className
- the class to which the Method belongsmethod
- the Methodpublic static XMethod createXMethod(org.apache.bcel.classfile.JavaClass javaClass, org.apache.bcel.classfile.Method method)
javaClass
- the class to which the Method belongsmethod
- the Methodpublic static void assertDottedClassName(@DottedClassName java.lang.String className)
public static void assertSlashedClassName(@SlashedClassName java.lang.String className)
public static XMethod createXMethodUsingSlashedClassName(@SlashedClassName java.lang.String className, java.lang.String methodName, java.lang.String methodSig, boolean isStatic)
className
- methodName
- methodSig
- isStatic
- public static XMethod createXMethod(@DottedClassName java.lang.String className, java.lang.String methodName, java.lang.String methodSig, boolean isStatic)
className
- methodName
- methodSig
- isStatic
- public static XMethod createXMethod(MethodDescriptor desc)
public static void profile()
public static XMethod createXMethod(MethodAnnotation ma)
public static XField createXFieldUsingSlashedClassName(@SlashedClassName java.lang.String className, java.lang.String fieldName, java.lang.String fieldSignature, boolean isStatic)
className
- fieldName
- fieldSignature
- isStatic
- public static XField createXField(@DottedClassName java.lang.String className, java.lang.String fieldName, java.lang.String fieldSignature, boolean isStatic)
className
- fieldName
- fieldSignature
- isStatic
- public static XField createXField(org.apache.bcel.generic.FieldInstruction fieldInstruction, org.apache.bcel.generic.ConstantPoolGen cpg)
public static XField createReferencedXField(DismantleBytecode visitor)
public static XMethod createReferencedXMethod(DismantleBytecode visitor)
public static XField createXField(FieldAnnotation f)
public static XField createXField(org.apache.bcel.classfile.JavaClass javaClass, org.apache.bcel.classfile.Field field)
public static XField createXField(java.lang.String className, org.apache.bcel.classfile.Field field)
className
- the name of the Java class containing the fieldfield
- the Field within the JavaClasspublic static XField getExactXField(@SlashedClassName java.lang.String className, java.lang.String name, java.lang.String signature, boolean isStatic)
className
- name of class containing the fieldname
- name of fieldsignature
- field signatureisStatic
- field access flags@Nonnull public static XField getExactXField(@SlashedClassName java.lang.String className, org.apache.bcel.classfile.Field f)
@Nonnull public static XField getExactXField(FieldDescriptor desc)
public static XField createXField(FieldDescriptor desc)
public static XMethod createXMethod(org.apache.bcel.generic.InvokeInstruction invokeInstruction, org.apache.bcel.generic.ConstantPoolGen cpg)
invokeInstruction
- the InvokeInstructioncpg
- ConstantPoolGen from the class containing the instructionpublic static XMethod createXMethod(PreorderVisitor visitor)
visitor
- the PreorderVisitorpublic static XField createXField(PreorderVisitor visitor)
visitor
- the PreorderVisitorpublic static XMethod createXMethod(org.apache.bcel.generic.MethodGen methodGen)
public static XMethod createXMethod(JavaClassAndMethod classAndMethod)
@CheckForNull public XClass getXClass(ClassDescriptor classDescriptor)
classDescriptor
- a ClassDescriptorpublic static <E extends ClassMember> int compare(E lhs, E rhs)
lhs
- an XMethod or XFieldrhs
- an XMethod or XFieldFindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.