Class BCELUtil

java.lang.Object
edu.umd.cs.findbugs.bcel.BCELUtil

public abstract class BCELUtil extends Object
Utility methods for detectors and analyses using BCEL.
Author:
David Hovemeyer
  • 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 JavaClass
      method - 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 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), use MemberUtils.isUserGenerated(FieldOrMethod) instead
      Checks 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)