|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 |
| Constructor Summary | |
|---|---|
DefaultModelProblem(String message,
ModelProblem.Severity severity,
Model source,
int lineNumber,
int columnNumber,
Exception exception)
Creates a new problem with the specified message and exception. |
|
DefaultModelProblem(String message,
ModelProblem.Severity severity,
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. |
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,
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,
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.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.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 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()
ModelProblem
getException in interface ModelProblemnull if not applicable.public String getMessage()
ModelProblem
getMessage in interface ModelProblemnull.public ModelProblem.Severity getSeverity()
ModelProblem
getSeverity in interface ModelProblemnull.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||