public class ValidationEventCollector extends java.lang.Object implements ValidationEventHandler
Simple implementation of a ValidationEventHandler
,
which simply collects all the events, regardless whether they
are warnings, errors, or fatal errors. You may retrieve these events
at a later time using getEvents()
.
Constructor and Description |
---|
ValidationEventCollector()
Creates a new instance of
ValidationEventCollector . |
Modifier and Type | Method and Description |
---|---|
ValidationEvent[] |
getEvents()
Returns the events collected so far.
|
boolean |
handleEvent(ValidationEvent pEvent)
Will always return true.
|
boolean |
hasEvents()
Returns whether any event has been collected.
|
void |
reset()
Clears the list of collected warnings, errors, and fatal errors.
|
public ValidationEventCollector()
Creates a new instance of ValidationEventCollector
.
public ValidationEvent[] getEvents()
Returns the events collected so far. Empty array, if no events have been found.
public void reset()
Clears the list of collected warnings, errors, and fatal errors.
public boolean hasEvents()
Returns whether any event has been collected.
public boolean handleEvent(ValidationEvent pEvent)
Will always return true.
handleEvent
in interface ValidationEventHandler
pEvent
- The event being reported to the JAXB user.