java.lang.Object
org.tquadrat.foundation.xml.parse.NullErrorHandler
- All Implemented Interfaces:
ErrorHandler
@ClassVersion(sourceVersion="$Id: NullErrorHandler.java 895 2021-04-05 12:40:34Z tquadrat $")
@API(status=STABLE,
since="0.1.0")
public final class NullErrorHandler
extends Object
implements ErrorHandler
This implementation for a XML Error handler swallows the error messages. The methods
have an empty body.
This error handler is useful when really no internal error handling is
desired; calling
DocumentBuilder.setErrorHandler(ErrorHandler)
with null as argument will activate a built-in error handler with
an unpredictable behaviour.
The one and only instance for this class can be obtained using the
INSTANCE
constant.
This simple initialisation pattern was chosen instead of a full Singleton setup because the error handler does not maintain a state.
- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: NullErrorHandler.java 895 2021-04-05 12:40:34Z tquadrat $
- Since:
- 0.1.0
- See Also:
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.xml.parse.NullErrorHandler"
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NullErrorHandlerThe one and only instance of this class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCreates a newNullErrorHandlerinstance. -
Method Summary
Modifier and TypeMethodDescriptionfinal voiderror(SAXParseException exception) final voidfatalError(SAXParseException exception) final voidwarning(SAXParseException exception)
-
Field Details
-
INSTANCE
The one and only instance of this class.
-
-
Constructor Details
-
NullErrorHandler
private NullErrorHandler()Creates a newNullErrorHandlerinstance.
-
-
Method Details
-
error
- Specified by:
errorin interfaceErrorHandler
-
fatalError
- Specified by:
fatalErrorin interfaceErrorHandler
-
warning
- Specified by:
warningin interfaceErrorHandler
-
