Class XClassUtils


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

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

      All Methods Static Methods Concrete Methods 
      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​(java.lang.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, java.lang.String methodName, java.lang.String methodSig)
      Looks for the method up the class hierarchy.
      static edu.umd.cs.findbugs.ba.XMethod getXMethod​(java.lang.String slashedClassName, java.lang.String methodName, java.lang.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 Detail

      • XClassUtils

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

      • getXClass

        public static edu.umd.cs.findbugs.ba.XClass getXClass​(edu.umd.cs.findbugs.classfile.ClassDescriptor classDesc)
                                                       throws java.lang.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:
        java.lang.AssertionError - if the analysis of the class failed
      • getXClass

        public static edu.umd.cs.findbugs.ba.XClass getXClass​(java.lang.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:
        java.lang.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,
                                                                java.lang.String methodName,
                                                                java.lang.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​(java.lang.String slashedClassName,
                                                                java.lang.String methodName,
                                                                java.lang.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