class DefaultProblem extends java.lang.Object implements Problem
Problem.Severity
Modifier and Type | Field and Description |
---|---|
private int |
columnNumber |
private java.lang.Exception |
exception |
private int |
lineNumber |
private java.lang.String |
message |
private Problem.Severity |
severity |
private java.lang.String |
source |
Constructor and Description |
---|
DefaultProblem(java.lang.String message,
Problem.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.
|
Problem.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 Problem.Severity severity
public DefaultProblem(java.lang.String message, Problem.Severity severity, java.lang.String source, int lineNumber, int columnNumber, java.lang.Exception exception)
message
or exception
is requiredmessage
- 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()
Problem
public int getLineNumber()
Problem
Problem.getSource()
.getLineNumber
in interface Problem
public int getColumnNumber()
Problem
Problem.getSource()
.getColumnNumber
in interface Problem
public java.lang.String getLocation()
Problem
Problem.getSource()
, Problem.getLineNumber()
and Problem.getColumnNumber()
. The exact syntax of the returned
value is undefined.getLocation
in interface Problem
null
.public java.lang.Exception getException()
Problem
getException
in interface Problem
null
if not applicable.public java.lang.String getMessage()
Problem
getMessage
in interface Problem
null
.public Problem.Severity getSeverity()
Problem
getSeverity
in interface Problem
null
.public java.lang.String toString()
toString
in class java.lang.Object