Class BCELUtil
java.lang.Object
edu.umd.cs.findbugs.bcel.BCELUtil
Utility methods for detectors and analyses using BCEL.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ClassDescriptorgetClassDescriptor(org.apache.bcel.classfile.JavaClass jclass) Construct a ClassDescriptor from a JavaClass.static MethodDescriptorgetMethodDescriptor(org.apache.bcel.classfile.JavaClass jclass, org.apache.bcel.classfile.Method method) Construct a MethodDescriptor from JavaClass and method.static org.apache.bcel.generic.ObjectTypegetObjectTypeInstance(String className) static booleanisSynthetic(org.apache.bcel.classfile.FieldOrMethod m) Deprecated.static booleanisSynthetic(org.apache.bcel.classfile.JavaClass j) static booleanisSynthetic(org.apache.bcel.generic.FieldGenOrMethodGen m) static booleanpreTiger(org.apache.bcel.classfile.JavaClass jclass) Checks if classfile was compiled for pre 1.5 target
-
Field Details
-
JDK15_MAJOR
private static final int JDK15_MAJOR- See Also:
-
JDK15_MINOR
private static final int JDK15_MINOR- See Also:
-
-
Constructor Details
-
BCELUtil
public BCELUtil()
-
-
Method Details
-
getMethodDescriptor
public static MethodDescriptor getMethodDescriptor(org.apache.bcel.classfile.JavaClass jclass, org.apache.bcel.classfile.Method method) Construct a MethodDescriptor from JavaClass and method.- Parameters:
jclass- a JavaClassmethod- a Method belonging to the JavaClass- Returns:
- a MethodDescriptor identifying the method
-
getClassDescriptor
Construct a ClassDescriptor from a JavaClass.- Parameters:
jclass- a JavaClass- Returns:
- a ClassDescriptor identifying that JavaClass
-
preTiger
public static boolean preTiger(org.apache.bcel.classfile.JavaClass jclass) Checks if classfile was compiled for pre 1.5 target -
getObjectTypeInstance
public static org.apache.bcel.generic.ObjectType getObjectTypeInstance(@DottedClassName String className) -
isSynthetic
Deprecated.You probably don't care for synthetic members, but want to know if the developer added it (think of lambdas), useMemberUtils.isUserGenerated(FieldOrMethod)insteadChecks if the given member is synthetic- Parameters:
m- The member to be checked- Returns:
- True if the member is synthetic, false otherwise
-
isSynthetic
public static boolean isSynthetic(org.apache.bcel.classfile.JavaClass j) -
isSynthetic
public static boolean isSynthetic(org.apache.bcel.generic.FieldGenOrMethodGen m)
-
MemberUtils.isUserGenerated(FieldOrMethod)instead