javax.xml.bind.util

Class ValidationEventCollector

Implemented Interfaces:
ValidationEventHandler

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().
Author:
JSR-31
Since:
JAXB1.0

Constructor Summary

ValidationEventCollector()
Creates a new instance of ValidationEventCollector.

Method Summary

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.

Constructor Details

ValidationEventCollector

public ValidationEventCollector()
Creates a new instance of ValidationEventCollector.

Method Details

getEvents

public ValidationEvent[] getEvents()
Returns the events collected so far. Empty array, if no events have been found.

handleEvent

public boolean handleEvent(ValidationEvent pEvent)
Will always return true.
Specified by:
handleEvent in interface ValidationEventHandler

hasEvents

public boolean hasEvents()
Returns whether any event has been collected.

reset

public void reset()
Clears the list of collected warnings, errors, and fatal errors.