Package com.mebigfatguy.fbcontrib.utils
Class XClassUtils
- java.lang.Object
-
- com.mebigfatguy.fbcontrib.utils.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 anXClass
object for the givenClassDescriptor
object.static edu.umd.cs.findbugs.ba.XClass
getXClass(java.lang.String slashedClassName)
Returns anXClass
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.
-
-
-
Method Detail
-
getXClass
public static edu.umd.cs.findbugs.ba.XClass getXClass(edu.umd.cs.findbugs.classfile.ClassDescriptor classDesc) throws java.lang.AssertionError
Returns anXClass
object for the givenClassDescriptor
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 anXClass
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 methodmethodName
- the name of the method to look formethodSig
- 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 methodmethodName
- the name of the method to look formethodSig
- the signature of the method to look for- Returns:
- the method
-
-