|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.model.building.DefaultModelProblem
public class DefaultModelProblem
Describes a problem that was encountered during model building. A problem can either be an exception that was thrown or a simple string message. In addition, a problem carries a hint about its source, e.g. the POM file that exhibits the problem.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.maven.model.building.ModelProblem |
---|
ModelProblem.Severity, ModelProblem.Version |
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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
.Method Detail |
---|
public String getSource()
ModelProblem
getSource
in interface ModelProblem
null
.public int getLineNumber()
ModelProblem
ModelProblem.getSource()
.
getLineNumber
in interface ModelProblem
public int getColumnNumber()
ModelProblem
ModelProblem.getSource()
.
getColumnNumber
in interface ModelProblem
public String getModelId()
ModelProblem
groupId: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 ModelProblem
null
.public Exception getException()
ModelProblem
getException
in interface ModelProblem
null
if not applicable.public String getMessage()
ModelProblem
getMessage
in interface ModelProblem
null
.public ModelProblem.Severity getSeverity()
ModelProblem
getSeverity
in interface ModelProblem
null
.public ModelProblem.Version getVersion()
ModelProblem
getVersion
in interface ModelProblem
null
.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |