- Javax.xml.bind classes
- Home
- Binder
- DatatypeConverter
- JAXB
- JAXBContext
- JAXBElement
- JAXBElement.GlobalScope
- JAXBIntrospector
- Marshaller.Listener
- SchemaOutputResolver
- Unmarshaller.Listener
- Javax.xml.bind.util classes
- JAXBResult
- JAXBSource
- ValidationEventCollector
- Javax.xml.parsers classes
- DocumentBuilder
- DocumentBuilderFactory
- SAXParser
- SAXParserFactory
- Javax.xml.soap classes
- AttachmentPart
- MessageFactory
- MimeHeader
- MimeHeaders
- SAAJMetaFactory
- SOAPConnection
- SOAPConnectionFactory
- SOAPFactory
- SOAPMessage
- SOAPPart
- Javax.xml.validation classes
- Schema
- SchemaFactory
- TypeInfoProvider
- Validator
- ValidatorHandler
- Javax.xml.xpath classes
- XPathConstants
- XPathFactory
- Java Useful Resources
- Java - Quick Guide
- Java - Useful Resources
Javax.xml.bind.Util.ValidationEventCollector Class
Introduction
The javax.xml.bind.Util.ValidationEventCollector class can be used by creating a new instance and pass it to the setEventHandler method of the Validator, Unmarshaller, Marshaller class. After the call to validate or unmarshal completes, call the getEvents method to retrieve all the reported errors and warnings.
Class declaration
Following is the declaration for javax.xml.bind.Util.ValidationEventCollector class −
public class ValidationEventCollector extends Object implements ValidationEventHandler
Class constructors
S.N. | Constructor & Description |
---|---|
1 | ValidationEventCollector()
Single Constructor. |
Class methods
S.N. | Method & Description |
---|---|
1 | ValidationEvent[] getEvents()
This method returns an array of ValidationEvent objects containing a copy of each of the collected errors and warnings. |
2 | boolean handleEvent(ValidationEvent event)
This method receive notification of a validation warning or error. |
3 | boolean hasEvents()
This method returns true if this event collector contains at least one ValidationEvent. |
4 | void reset()
This method clears all collected errors and warnings. |
Methods inherited
This class inherits methods from the following classes −
javax.xml.Object