javax.xml.bind.util

Class ValidationEventCollector

public class ValidationEventCollector extends Object implements ValidationEventHandler

Simple implementation of a {@link javax.xml.bind.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 {@link #getEvents()}.

Since: JAXB1.0

Author: JSR-31

Constructor Summary
ValidationEventCollector()

Creates a new instance of ValidationEventCollector.

Method Summary
ValidationEvent[]getEvents()

Returns the events collected so far.

booleanhandleEvent(ValidationEvent pEvent)

Will always return true.

booleanhasEvents()

Returns whether any event has been collected.

voidreset()

Clears the list of collected warnings, errors, and fatal errors.

Constructor Detail

ValidationEventCollector

public ValidationEventCollector()

Creates a new instance of ValidationEventCollector.

Method Detail

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.

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.