Package edu.umd.cs.findbugs.bcel
Class BCELUtil
- java.lang.Object
-
- edu.umd.cs.findbugs.bcel.BCELUtil
-
public abstract class BCELUtil extends java.lang.Object
Utility methods for detectors and analyses using BCEL.- Author:
- David Hovemeyer
-
-
Constructor Summary
Constructors Constructor Description BCELUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ClassDescriptor
getClassDescriptor(org.apache.bcel.classfile.JavaClass jclass)
Construct a ClassDescriptor from a JavaClass.static MethodDescriptor
getMethodDescriptor(org.apache.bcel.classfile.JavaClass jclass, org.apache.bcel.classfile.Method method)
Construct a MethodDescriptor from JavaClass and method.static org.apache.bcel.generic.ObjectType
getObjectTypeInstance(java.lang.String className)
static boolean
isSynthetic(org.apache.bcel.classfile.FieldOrMethod m)
Deprecated.You probably don't care for synthetic members, but want to know if the developer added it (think of lambdas), useMemberUtils.isUserGenerated(FieldOrMethod)
insteadstatic boolean
isSynthetic(org.apache.bcel.classfile.JavaClass j)
static boolean
isSynthetic(org.apache.bcel.generic.FieldGenOrMethodGen m)
static boolean
preTiger(org.apache.bcel.classfile.JavaClass jclass)
Checks if classfile was compiled for pre 1.5 target
-
-
-
Method Detail
-
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
public static ClassDescriptor getClassDescriptor(org.apache.bcel.classfile.JavaClass jclass)
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 java.lang.String className)
-
isSynthetic
@Deprecated public static boolean isSynthetic(org.apache.bcel.classfile.FieldOrMethod m)
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)
-
-