Class XClassUtils

java.lang.Object
com.mebigfatguy.fbcontrib.utils.XClassUtils

public final class XClassUtils extends Object
Utility class for XClass and XMethod classes.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    private to enforce the helper nature of this static class
  • Method Summary

    Modifier and Type
    Method
    Description
    static edu.umd.cs.findbugs.ba.XClass
    getXClass(edu.umd.cs.findbugs.classfile.ClassDescriptor classDesc)
    Returns an XClass object for the given ClassDescriptor object.
    static edu.umd.cs.findbugs.ba.XClass
    getXClass(String slashedClassName)
    Returns an XClass object for the given slashed class name.
    static edu.umd.cs.findbugs.ba.XMethod
    getXMethod(edu.umd.cs.findbugs.ba.XClass xClass, String methodName, String methodSig)
    Looks for the method up the class hierarchy.
    static edu.umd.cs.findbugs.ba.XMethod
    getXMethod(String slashedClassName, String methodName, String methodSig)
    Looks for the method up the class hierarchy.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • XClassUtils

      private XClassUtils()
      private to enforce the helper nature of this static class
  • Method Details

    • getXClass

      public static edu.umd.cs.findbugs.ba.XClass getXClass(edu.umd.cs.findbugs.classfile.ClassDescriptor classDesc) throws AssertionError
      Returns an XClass object for the given ClassDescriptor object.
      Parameters:
      classDesc - the class descriptor for which to find the XClass object
      Returns:
      the class
      Throws:
      AssertionError - if the analysis of the class failed
    • getXClass

      public static edu.umd.cs.findbugs.ba.XClass getXClass(String slashedClassName)
      Returns an XClass object for the given slashed class name.
      Parameters:
      slashedClassName - the class name for which to find the XClass object
      Returns:
      the class
      Throws:
      AssertionError - if the analysis of the class failed
    • getXMethod

      @Nullable public static edu.umd.cs.findbugs.ba.XMethod getXMethod(edu.umd.cs.findbugs.ba.XClass xClass, String methodName, String methodSig)
      Looks for the method up the class hierarchy.
      Parameters:
      xClass - the class where to look for the method
      methodName - the name of the method to look for
      methodSig - the signature of the method to look for
      Returns:
      the method
    • getXMethod

      @Nullable public static edu.umd.cs.findbugs.ba.XMethod getXMethod(String slashedClassName, String methodName, String methodSig)
      Looks for the method up the class hierarchy.
      Parameters:
      slashedClassName - the class slashed name where to look for the method
      methodName - the name of the method to look for
      methodSig - the signature of the method to look for
      Returns:
      the method