public final class ProblemsReporter extends Object
problems
found while validating an ExtensionModel
.
The purpose is to simply notify all the problems found together.Constructor and Description |
---|
ProblemsReporter(ExtensionModel extensionModel)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
ProblemsReporter |
addError(Problem problem)
Adds an error
|
ProblemsReporter |
addWarning(Problem problem)
Adds a warning
|
List<Problem> |
getErrors() |
ExtensionModel |
getExtensionModel() |
List<Problem> |
getWarnings() |
String |
getWarningsAsString() |
boolean |
hasErrors() |
boolean |
hasWarnings() |
String |
toString() |
public ProblemsReporter(ExtensionModel extensionModel)
extensionModel
- the model which is being validatedpublic ProblemsReporter addError(Problem problem)
problem
- the problem foundthis
reporterpublic ProblemsReporter addWarning(Problem problem)
problem
- the warning foundthis
reporterpublic boolean hasErrors()
public boolean hasWarnings()
public ExtensionModel getExtensionModel()
ExtensionModel
that is being/was validatedpublic String getWarningsAsString()
Copyright © 2018. All rights reserved.