Class ClassDescriptor
java.lang.Object
edu.umd.cs.findbugs.classfile.ClassDescriptor
- All Implemented Interfaces:
Serializable, Comparable<ClassDescriptor>
- Direct Known Subclasses:
ClassNameAndSuperclassInfo
Descriptor identifying a class.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Patternprivate final Stringstatic final ClassDescriptor[]private static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintfinal booleanfinal StringGet the name of the class in dotted format.Get the name of the package in dotted format.Get the simple name of the classinthashCode()booleanbooleanisArray()booleanstatic voidthrowClassNotFoundException(ClassDescriptor classDescriptor) Throw a ClassNotFoundException to indicate that class named by given ClassDescriptor cannot be found.Deprecated.Get the resource name of this class as it would appear in the classpath.toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
className
-
ANONYMOUS_CLASS_NAME
-
EMPTY_ARRAY
-
-
Constructor Details
-
ClassDescriptor
Constructor.- Parameters:
className- class name in VM format, e.g. "java/lang/String"
-
-
Method Details
-
getClassName
- Returns:
- Returns the class name in VM format, e.g. "java/lang/String"
-
compareTo
- Specified by:
compareToin interfaceComparable<ClassDescriptor>
-
matches
-
toResourceName
Get the resource name of this class as it would appear in the classpath. E.g., "java/lang/String.class"- Returns:
- the resource name
-
toDottedClassName
Deprecated.usegetDottedClassName()instead.Get the name of the class in dotted format.- Returns:
- the name of the class in dotted format
-
getDottedClassName
Get the name of the class in dotted format.- Returns:
- the name of the class in dotted format
-
getXClass
- Throws:
CheckedAnalysisException
-
getPackageName
Get the name of the package in dotted format.- Returns:
- the name of the package in dotted format
-
getSimpleName
Get the simple name of the class- Returns:
- the simple name of the class
-
getSignature
-
isArray
public boolean isArray() -
toString
-
equals
-
hashCode
-
throwClassNotFoundException
public static void throwClassNotFoundException(ClassDescriptor classDescriptor) throws ClassNotFoundException Throw a ClassNotFoundException to indicate that class named by given ClassDescriptor cannot be found. The exception message is formatted in a way that can be decoded by ClassNotFoundExceptionParser.- Parameters:
classDescriptor- ClassDescriptor naming a class that cannot be found- Throws:
ClassNotFoundException- See Also:
-
isAnonymousClass
public boolean isAnonymousClass()
-
getDottedClassName()instead.