public class DefaultModelProblem extends Object implements ModelProblem
ModelProblem.Severity, ModelProblem.Version| Constructor and Description |
|---|
DefaultModelProblem(String message,
ModelProblem.Severity severity,
ModelProblem.Version version,
Model source,
int lineNumber,
int columnNumber,
Exception exception)
Creates a new problem with the specified message and exception.
|
DefaultModelProblem(String message,
ModelProblem.Severity severity,
ModelProblem.Version version,
String source,
int lineNumber,
int columnNumber,
String modelId,
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 |
getMessage()
Gets the message that describes this problem.
|
String |
getModelId()
Gets the identifier of the model from which the problem originated.
|
ModelProblem.Severity |
getSeverity()
Gets the severity level of this problem.
|
String |
getSource()
Gets the hint about the source of the problem.
|
ModelProblem.Version |
getVersion()
Gets the applicable maven version/validation level of this problem
|
String |
toString() |
public DefaultModelProblem(String message, ModelProblem.Severity severity, ModelProblem.Version version, Model 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
ModelProblem.Severity.ERROR.source - The source of the problem, may be null.lineNumber - The one-based index of the line containing the error or -1 if unknown.columnNumber - The one-based index of the column containing the error or -1 if unknown.exception - The exception that caused this problem, may be null.public DefaultModelProblem(String message, ModelProblem.Severity severity, ModelProblem.Version version, String source, int lineNumber, int columnNumber, String modelId, Exception exception)
message - The message describing the problem, may be null.severity - The severity level of the problem, may be null to default to
ModelProblem.Severity.ERROR.version - The version since the problem is relevantsource - 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.modelId - The identifier of the model that exhibits the problem, may be null.exception - The exception that caused this problem, may be null.public String getSource()
ModelProblemgetSource in interface ModelProblemnull.public int getLineNumber()
ModelProblemModelProblem.getSource().getLineNumber in interface ModelProblempublic int getColumnNumber()
ModelProblemModelProblem.getSource().getColumnNumber in interface ModelProblempublic String getModelId()
ModelProblemgroupId:artifactId:version the returned identifier need not be complete. The identifier is derived
from the information that is available at the point the problem occurs and as such merely serves as a best effort
to provide information to the user to track the problem back to its origin.getModelId in interface ModelProblemnull.public Exception getException()
ModelProblemgetException in interface ModelProblemnull if not applicable.public String getMessage()
ModelProblemgetMessage in interface ModelProblemnull.public ModelProblem.Severity getSeverity()
ModelProblemgetSeverity in interface ModelProblemnull.public ModelProblem.Version getVersion()
ModelProblemgetVersion in interface ModelProblemnull.Copyright © 2001-2014 The Apache Software Foundation. All Rights Reserved.