|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.xml.bind.helpers Class DefaultValidationEventHandler
java.lang.Object javax.xml.bind.helpers.DefaultValidationEventHandler
- All Implemented Interfaces:
- ValidationEventHandler
public class DefaultValidationEventHandler
- extends Object
- implements ValidationEventHandler
唯一的 JAXB 1.0 默认验证事件处理程序。对于所有根据管理模式派生代码(该代码由 JAXB 1.0 绑定编译器生成)的 JAXBContext 而创建的对象,此类是默认处理程序。
此处理程序在第一次出现错误或出现严重错误时将导致解组和验证操作失败。
对于遵守 JAXB 2.0 和以后版本的映射 JAXB 的类,此处理程序不再是默认处理器。默认验证事件处理已经更改,它在 javax.xml.bind.Unmarshaller
和 javax.xml.bind.Marshaller
中指定。
version |
| |
since | JAXB1.0 | |
See also | javax.xml.bind.Unmarshaller, javax.xml.bind.Validator, javax.xml.bind.ValidationEventHandler |
JAXB 1.0 only default validation event handler. This is the default handler for all objects created from a JAXBContext that is managing schema-derived code generated by a JAXB 1.0 binding compiler.
This handler causes the unmarshal and validate operations to fail on the first error or fatal error.
This handler is not the default handler for JAXB mapped classes following
JAXB 2.0 or later versions. Default validation event handling has changed
and is specified in Unmarshaller
and
Marshaller
.
- Since:
- JAXB1.0
- Version:
- $Revision: 1.5 $
- Author:
- Ryan Shoemaker, Sun Microsystems, Inc.
- See Also:
Unmarshaller
,Validator
,ValidationEventHandler
Constructor Summary | |
---|---|
DefaultValidationEventHandler()
|
Method Summary | |
---|---|
boolean |
handleEvent(ValidationEvent event)
Receive notification of a validation warning or error. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public
DefaultValidationEventHandler()
英文文档:
DefaultValidationEventHandler
public DefaultValidationEventHandler()
Method Detail |
---|
public boolean
handleEvent(ValidationEvent event)
英文文档:
handleEvent
public boolean handleEvent(ValidationEvent event)
- Description copied from interface:
ValidationEventHandler
- Receive notification of a validation warning or error.
The ValidationEvent will have a
ValidationEventLocator
embedded in it that indicates where the error or warning occurred.If an unchecked runtime exception is thrown from this method, the JAXB provider will treat it as if the method returned false and interrupt the current unmarshal, validate, or marshal operation.
- Specified by:
handleEvent
in interfaceValidationEventHandler
- Parameters:
event
- the encapsulated validation event information. It is a provider error if this parameter is null.- Returns:
- true if the JAXB Provider should attempt to continue the current unmarshal, validate, or marshal operation after handling this warning/error, false if the provider should terminate the current operation with the appropriate UnmarshalException, ValidationException, or MarshalException.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!