javax.xml.bind.helpers
Class DefaultValidationEventHandler
java.lang.Object
javax.xml.bind.helpers.DefaultValidationEventHandler
- ValidationEventHandler
public class DefaultValidationEventHandler
extends java.lang.Object
Default implementation of a
ValidationEventHandler
.
Causes the validation to fail as soon as the first error or
fatal error is encountered.
This instance of
ValidationEventHandler
is
suitable for use of the unmarshallers or validators default event handler.
DefaultValidationEventHandler
public DefaultValidationEventHandler()
Creates a new instance of DefaultValidationEventHandler
.
handleEvent
public boolean handleEvent(ValidationEvent event)
The
handleEvent
method is invoked by the
JAXB provider, if a problem was found. The events
ValidationEventLocator
may be
used to locate the source of the problem.
- handleEvent in interface ValidationEventHandler
- True as an indicator that the JAXB provider should
attempt to continue its current operation. (Marshalling,
Unmarshalling, Validating) This will not always work.
In particular, you cannot expect that the operation
continues, if a fatal error was reported. False to
indicate that the JAXB provider should terminate the
operation and through an appropriate exception.