Package edu.umd.cs.findbugs.ba
Class ClassNotFoundExceptionParser
- java.lang.Object
-
- edu.umd.cs.findbugs.ba.ClassNotFoundExceptionParser
-
public class ClassNotFoundExceptionParser extends java.lang.Object
Parse the detail message in a ClassNotFoundException to extract the name of the missing class. Unfortunately, this information is not directly available from the exception object. So, this class parses the detail message in several common formats (such as the format used by BCEL).
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.regex.Pattern
BCEL_MISSING_CLASS_PATTERN
private static java.util.regex.Pattern[]
patternList
private static java.util.regex.Pattern
TYPE_REPOSITORY_MISSING_CLASS_PATTERN
-
Constructor Summary
Constructors Constructor Description ClassNotFoundExceptionParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getMissingClassName(java.lang.ClassNotFoundException ex)
Get the name of the missing class from a ClassNotFoundException.
-
-
-
Field Detail
-
BCEL_MISSING_CLASS_PATTERN
private static final java.util.regex.Pattern BCEL_MISSING_CLASS_PATTERN
-
TYPE_REPOSITORY_MISSING_CLASS_PATTERN
private static final java.util.regex.Pattern TYPE_REPOSITORY_MISSING_CLASS_PATTERN
-
patternList
private static final java.util.regex.Pattern[] patternList
-
-
Method Detail
-
getMissingClassName
@DottedClassName public static java.lang.String getMissingClassName(java.lang.ClassNotFoundException ex)
Get the name of the missing class from a ClassNotFoundException.- Parameters:
ex
- the ClassNotFoundException- Returns:
- the name of the missing class, or null if we couldn't figure out the class name
-
-