class DefaultProblemCollector extends java.lang.Object implements ProblemCollector
Modifier and Type | Field and Description |
---|---|
private java.util.List<Problem> |
problems |
private java.lang.String |
source |
Constructor and Description |
---|
DefaultProblemCollector(java.util.List<Problem> problems) |
Modifier and Type | Method and 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.
|
private java.util.List<Problem> problems
private java.lang.String source
public DefaultProblemCollector(java.util.List<Problem> problems)
public java.util.List<Problem> getProblems()
getProblems
in interface ProblemCollector
null
public void setSource(java.lang.String source)
ProblemCollector
setSource
in interface ProblemCollector
public void add(Problem.Severity severity, java.lang.String message, int line, int column, java.lang.Exception cause)
ProblemCollector
add
in interface ProblemCollector
severity
- The severity of the problem, must not be null
.message
- The detail message of the problem, may be null
.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 be null
.