org.jcoderz.commons.util
Class JaxbUtil.ValidationEventCollector

java.lang.Object
  extended by org.jcoderz.commons.util.JaxbUtil.ValidationEventCollector
All Implemented Interfaces:
ValidationEventHandler
Enclosing class:
JaxbUtil

public static class JaxbUtil.ValidationEventCollector
extends Object
implements ValidationEventHandler

Validation handler for JAXB.

Author:
Michael Griffel

Constructor Summary
JaxbUtil.ValidationEventCollector()
           
 
Method Summary
 List getEvents()
          Returns all the collected errors and warnings or an empty list if there weren't any.
 boolean handleEvent(ValidationEvent event)
          
 boolean hasEvents()
          Returns true if this event collector contains at least one ValidationEvent.
 void reset()
          Clear all collected errors and warnings.
 String toString()
          Returns a summary of the validation events as String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JaxbUtil.ValidationEventCollector

public JaxbUtil.ValidationEventCollector()
Method Detail

getEvents

public List getEvents()
Returns all the collected errors and warnings or an empty list if there weren't any. The result is an unmodifiable list.

Returns:
all the collected errors and warnings or an empty list if there weren't any. The result is an unmodifiable list.

reset

public void reset()
Clear all collected errors and warnings.


hasEvents

public boolean hasEvents()
Returns true if this event collector contains at least one ValidationEvent.

Returns:
true if this event collector contains at least one ValidationEvent, false otherwise

handleEvent

public boolean handleEvent(ValidationEvent event)

Specified by:
handleEvent in interface ValidationEventHandler

toString

public String toString()
Returns a summary of the validation events as String.

Overrides:
toString in class Object
Returns:
a summary of the validation events as String.


Copyright 2007 The jCoderZ Project.