Package edu.umd.cs.findbugs
Class AnalysisError
- java.lang.Object
-
- edu.umd.cs.findbugs.AnalysisError
-
public class AnalysisError extends java.lang.Object
Object recording a recoverable error that occurred during analysis.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Throwable
exception
private java.lang.String
exceptionMessage
private java.lang.String
message
private java.lang.String
nestedExceptionMessage
private java.lang.String[]
nestedStackTrace
private static int
PRIME
private java.lang.String[]
stackTrace
-
Constructor Summary
Constructors Constructor Description AnalysisError(java.lang.String message)
Constructor.AnalysisError(java.lang.String message, java.lang.Throwable exception)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.Throwable
getException()
java.lang.String
getExceptionMessage()
Get the exception message.java.lang.String
getMessage()
Get the message describing the error.java.lang.String
getNestedExceptionMessage()
Get the exception message.java.lang.String[]
getNestedStackTrace()
Get the stack trace elements.java.lang.String[]
getStackTrace()
Get the stack trace elements.private java.lang.String[]
getStackTraceAsStringArray(java.lang.Throwable exception)
int
hashCode()
void
setExceptionMessage(java.lang.String exceptionMessage)
Set the exception message.void
setMessage(java.lang.String message)
Set the message describing the error.void
setStackTrace(java.lang.String[] stackTraceList)
Set the stack trace elements.
-
-
-
Field Detail
-
PRIME
private static final int PRIME
- See Also:
- Constant Field Values
-
message
private java.lang.String message
-
exceptionMessage
private java.lang.String exceptionMessage
-
stackTrace
private java.lang.String[] stackTrace
-
nestedExceptionMessage
private java.lang.String nestedExceptionMessage
-
nestedStackTrace
private java.lang.String[] nestedStackTrace
-
exception
private final java.lang.Throwable exception
-
-
Constructor Detail
-
AnalysisError
public AnalysisError(java.lang.String message)
Constructor.- Parameters:
message
- message describing the error
-
AnalysisError
public AnalysisError(java.lang.String message, java.lang.Throwable exception)
Constructor.- Parameters:
message
- message describing the errorexception
- exception which is the cause of the error
-
-
Method Detail
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
getStackTraceAsStringArray
private java.lang.String[] getStackTraceAsStringArray(java.lang.Throwable exception)
-
setMessage
public void setMessage(java.lang.String message)
Set the message describing the error.- Parameters:
message
- message describing the error
-
getMessage
public java.lang.String getMessage()
Get the message describing the error.
-
setExceptionMessage
public void setExceptionMessage(java.lang.String exceptionMessage)
Set the exception message. This is the value returned by calling toString() on the original exception object.- Parameters:
exceptionMessage
- the exception message
-
getExceptionMessage
public java.lang.String getExceptionMessage()
Get the exception message. This is the value returned by calling toString() on the original exception object.
-
getNestedExceptionMessage
public java.lang.String getNestedExceptionMessage()
Get the exception message. This is the value returned by calling toString() on the original exception object.
-
setStackTrace
public void setStackTrace(java.lang.String[] stackTraceList)
Set the stack trace elements. These are the strings returned by calling toString() on each StackTraceElement in the original exception.- Parameters:
stackTraceList
- the stack trace elements
-
getStackTrace
public java.lang.String[] getStackTrace()
Get the stack trace elements. These are the strings returned by calling toString() on each StackTraceElement in the original exception.
-
getNestedStackTrace
public java.lang.String[] getNestedStackTrace()
Get the stack trace elements. These are the strings returned by calling toString() on each StackTraceElement in the original exception.
-
getException
public java.lang.Throwable getException()
- Returns:
- original exception object, or null if no exception was thrown
-
-