public class ValidationResultsCollectorImpl extends Object implements ValidationResultCollector
Modifier and Type | Field and Description |
---|---|
protected Map<ModelElementInstance,List<ValidationResult>> |
collectedResults |
protected ModelElementInstance |
currentElement |
protected int |
errorCount |
protected int |
warningCount |
Constructor and Description |
---|
ValidationResultsCollectorImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addError(int code,
String message)
Adds an error
|
void |
addWarning(int code,
String message)
Adds a warining
|
ValidationResults |
getResults() |
protected List<ValidationResult> |
resultsForCurrentElement() |
void |
setCurrentElement(ModelElementInstance currentElement) |
protected ModelElementInstance currentElement
protected Map<ModelElementInstance,List<ValidationResult>> collectedResults
protected int errorCount
protected int warningCount
public void addError(int code, String message)
ValidationResultCollector
addError
in interface ValidationResultCollector
code
- a reference code for the errormessage
- a human consumable error messagepublic void addWarning(int code, String message)
ValidationResultCollector
addWarning
in interface ValidationResultCollector
code
- a reference code for the errormessage
- a human consumable error messagepublic void setCurrentElement(ModelElementInstance currentElement)
public ValidationResults getResults()
protected List<ValidationResult> resultsForCurrentElement()
Copyright © 2021. All rights reserved.