Package org.apache.maven.building
Class DefaultProblemCollector
- java.lang.Object
-
- org.apache.maven.building.DefaultProblemCollector
-
- All Implemented Interfaces:
ProblemCollector
class DefaultProblemCollector extends java.lang.Object implements ProblemCollector
Collects problems that are encountered during settings building.
-
-
Constructor Summary
Constructors Constructor Description DefaultProblemCollector(java.util.List<Problem> problems)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Problem.Severity severity, java.lang.String message, int line, int column, java.lang.Exception cause)
Adds the specified problem.java.util.List<Problem>
getProblems()
void
setSource(java.lang.String source)
The next messages will be bound to this source.
-
-
-
Field Detail
-
problems
private java.util.List<Problem> problems
-
source
private java.lang.String source
-
-
Constructor Detail
-
DefaultProblemCollector
DefaultProblemCollector(java.util.List<Problem> problems)
-
-
Method Detail
-
getProblems
public java.util.List<Problem> getProblems()
- Specified by:
getProblems
in interfaceProblemCollector
- Returns:
- the collected Problems, never
null
-
setSource
public void setSource(java.lang.String source)
Description copied from interface:ProblemCollector
The next messages will be bound to this source. When calling this method again, previous messages keep their source, but the next messages will use the new source.- Specified by:
setSource
in interfaceProblemCollector
-
add
public void add(Problem.Severity severity, java.lang.String message, int line, int column, java.lang.Exception cause)
Description copied from interface:ProblemCollector
Adds the specified problem. Either message or exception is required- Specified by:
add
in interfaceProblemCollector
- Parameters:
severity
- The severity of the problem, must not benull
.message
- The detail message of the problem, may benull
.line
- The one-based index of the line containing the problem or-1
if unknown.column
- The one-based index of the column containing the problem or-1
if unknown.cause
- The cause of the problem, may benull
.
-
-