Package org.eclipse.persistence.jaxb
Class JAXBErrorHandler
- java.lang.Object
-
- org.eclipse.persistence.jaxb.JAXBErrorHandler
-
- All Implemented Interfaces:
org.xml.sax.ErrorHandler
public class JAXBErrorHandler extends java.lang.Object implements org.xml.sax.ErrorHandlerImplementation of org.xml.sax.ErrorHandler. When JAXBMarshaller or JAXBUnmarshaller is given a ValidationEventHandler a JAXBErrorHandler is used to wrap it. This ErrorHandler is then used by the underlying XMLMarshaller or XMLUnmarshaller.
-
-
Constructor Summary
Constructors Constructor Description JAXBErrorHandler(ValidationEventHandler validationEventHandler)Create a new JAXBErrorHandler with the specified ValidationEventHandler
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiderror(org.xml.sax.SAXParseException exception)Handle errors.voidfatalError(org.xml.sax.SAXParseException exception)Handle fatal errors.ValidationEventHandlergetValidationEventHandler()Return the ValidationEventHandler associated with this JAXBErrorHandler.voidwarning(org.xml.sax.SAXParseException exception)Handle warnings The exception will be given to the ValidationEventHandler at to attempt to handle.
-
-
-
Constructor Detail
-
JAXBErrorHandler
public JAXBErrorHandler(ValidationEventHandler validationEventHandler)
Create a new JAXBErrorHandler with the specified ValidationEventHandler- Parameters:
validationEventHandler-
-
-
Method Detail
-
warning
public void warning(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXExceptionHandle warnings The exception will be given to the ValidationEventHandler at to attempt to handle.- Specified by:
warningin interfaceorg.xml.sax.ErrorHandler- Parameters:
exception- the SAXParseException that occurred- Throws:
org.xml.sax.SAXException
-
error
public void error(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXExceptionHandle errors. The exception will be given to the ValidationEventHandler at to attempt to handle.- Specified by:
errorin interfaceorg.xml.sax.ErrorHandler- Parameters:
exception- the SAXParseException that occurred- Throws:
org.xml.sax.SAXException
-
fatalError
public void fatalError(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXExceptionHandle fatal errors. The exception will be given to the ValidationEventHandler at to attempt to handle.- Specified by:
fatalErrorin interfaceorg.xml.sax.ErrorHandler- Parameters:
exception- the SAXParseException that occurred- Throws:
org.xml.sax.SAXException
-
getValidationEventHandler
public ValidationEventHandler getValidationEventHandler()
Return the ValidationEventHandler associated with this JAXBErrorHandler.- Returns:
- the ValidationEventHandler associated with this JAXBErrorHandler.
-
-