public class DefaultSettingsProblem extends Object implements SettingsProblem
SettingsProblem.Severity
Constructor and Description |
---|
DefaultSettingsProblem(String message,
SettingsProblem.Severity severity,
String source,
int lineNumber,
int columnNumber,
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.
|
Exception |
getException()
Gets the exception that caused this problem (if any).
|
int |
getLineNumber()
Gets the one-based index of the line containing the problem.
|
String |
getLocation()
Gets the location of the problem.
|
String |
getMessage()
Gets the message that describes this problem.
|
SettingsProblem.Severity |
getSeverity()
Gets the severity level of this problem.
|
String |
getSource()
Gets the hint about the source of the problem.
|
String |
toString() |
public DefaultSettingsProblem(String message, SettingsProblem.Severity severity, String source, int lineNumber, int columnNumber, 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 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 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 Exception getException()
SettingsProblem
getException
in interface SettingsProblem
null
if not applicable.public String getMessage()
SettingsProblem
getMessage
in interface SettingsProblem
null
.public SettingsProblem.Severity getSeverity()
SettingsProblem
getSeverity
in interface SettingsProblem
null
.Copyright © 2001–2023 The Apache Software Foundation. All rights reserved.