public class JMValidatorImpl extends JMControllerImpl implements JMValidator
Marshaller
, which generates SAX events.
The SAX events are piped into an instance of
UnmarshallerHandler
.eventHandler, JAXME_DATATYPE_CONVERTER, JAXME_FORMAT_DATE, JAXME_FORMAT_DATETIME, JAXME_FORMAT_TIME, JAXME_PRIVATE
Constructor and Description |
---|
JMValidatorImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
validate(java.lang.Object pObject)
Validates the given JAXB object, invoking its error handler
for any problems it detects.
|
boolean |
validateRoot(java.lang.Object pObject)
Validates the given JAXB object, but not its child
elements.
|
getDatatypeConverter, getDateFormat, getDateTimeFormat, getEventHandler, getJAXBContextImpl, getProperty, getTimeFormat, setDatatypeConverter, setDateFormat, setDateTimeFormat, setEventHandler, setJAXBContextImpl, setProperty, setTimeFormat
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getJAXBContextImpl, setJAXBContextImpl
getEventHandler, getProperty, setEventHandler, setProperty
public boolean validate(java.lang.Object pObject) throws JAXBException
Validator
Validates the given JAXB object, invoking its error handler
for any problems it detects. Detected problems may cause exceptions,
for example, if the event handlers
ValidationEventHandler.handleEvent(ValidationEvent)
method returns false.
validate
in interface Validator
pObject
- The JAXB object being validated.JAXBException
- An unexpected problem occurred during
validationValidationException
- It was detected, that the
object is invalid.Validator.validateRoot(Object)
public boolean validateRoot(java.lang.Object pObject) throws JAXBException
Validator
Validates the given JAXB object, but not its child elements.
validateRoot
in interface Validator
pObject
- The JAXB object being validated.JAXBException
- An unexpected problem occurred during
validationValidationException
- It was detected, that the
object is invalid.Validator.validate(Object)