public class DefaultSettingsProblem extends java.lang.Object implements SettingsProblem
SettingsProblem.Severity
Modifier and Type | Field and Description |
---|---|
private int |
columnNumber |
private java.lang.Exception |
exception |
private int |
lineNumber |
private java.lang.String |
message |
private SettingsProblem.Severity |
severity |
private java.lang.String |
source |
Constructor and Description |
---|
DefaultSettingsProblem(java.lang.String message,
SettingsProblem.Severity severity,
java.lang.String source,
int lineNumber,
int columnNumber,
java.lang.Exception exception)
Creates a new problem with the specified message and exception.
|
Modifier and Type | Method and Description |
---|---|
int |
getColumnNumber()
Gets the one-based index of the column containing the problem.
|
java.lang.Exception |
getException()
Gets the exception that caused this problem (if any).
|
int |
getLineNumber()
Gets the one-based index of the line containing the problem.
|
java.lang.String |
getLocation()
Gets the location of the problem.
|
java.lang.String |
getMessage()
Gets the message that describes this problem.
|
SettingsProblem.Severity |
getSeverity()
Gets the severity level of this problem.
|
java.lang.String |
getSource()
Gets the hint about the source of the problem.
|
java.lang.String |
toString() |
private final java.lang.String source
private final int lineNumber
private final int columnNumber
private final java.lang.String message
private final java.lang.Exception exception
private final SettingsProblem.Severity severity
public DefaultSettingsProblem(java.lang.String message, SettingsProblem.Severity severity, java.lang.String source, int lineNumber, int columnNumber, java.lang.Exception exception)
message
- The message describing the problem, may be null
.severity
- The severity level of the problem, may be null
to default to
SettingsProblem.Severity.ERROR
.source
- A hint about the source of the problem like a file path, may be null
.lineNumber
- The one-based index of the line containing the problem or -1
if unknown.columnNumber
- The one-based index of the column containing the problem or -1
if unknown.exception
- The exception that caused this problem, may be null
.public java.lang.String getSource()
SettingsProblem
getSource
in interface SettingsProblem
null
.public int getLineNumber()
SettingsProblem
SettingsProblem.getSource()
.getLineNumber
in interface SettingsProblem
public int getColumnNumber()
SettingsProblem
SettingsProblem.getSource()
.getColumnNumber
in interface SettingsProblem
public java.lang.String getLocation()
SettingsProblem
SettingsProblem.getSource()
, SettingsProblem.getLineNumber()
and SettingsProblem.getColumnNumber()
. The exact syntax of the returned
value is undefined.getLocation
in interface SettingsProblem
null
.public java.lang.Exception getException()
SettingsProblem
getException
in interface SettingsProblem
null
if not applicable.public java.lang.String getMessage()
SettingsProblem
getMessage
in interface SettingsProblem
null
.public SettingsProblem.Severity getSeverity()
SettingsProblem
getSeverity
in interface SettingsProblem
null
.public java.lang.String toString()
toString
in class java.lang.Object