|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.xml.bind.helpers Class ValidationEventImpl
java.lang.Object javax.xml.bind.helpers.ValidationEventImpl
- All Implemented Interfaces:
- ValidationEvent
- Direct Known Subclasses:
- NotIdentifiableEventImpl, ParseConversionEventImpl, PrintConversionEventImpl
public class ValidationEventImpl
- extends Object
- implements ValidationEvent
Implements:
ValidationEvent
ValidationEvent 接口的默认实现。
允许 JAXB 提供者使用实现了 ValidationEvent 接口的任何类。提供此类只是为了方便使用。
version |
| |
since | JAXB1.0 | |
See also | javax.xml.bind.Validator, javax.xml.bind.ValidationEventHandler, javax.xml.bind.ValidationEvent, javax.xml.bind.ValidationEventLocator |
Default implementation of the ValidationEvent interface.
JAXB providers are allowed to use whatever class that implements the ValidationEvent interface. This class is just provided for a convenience.
- Since:
- JAXB1.0
- Version:
- $Revision: 1.1 $
- Author:
- Kohsuke Kawaguchi, Sun Microsystems, Inc.
- See Also:
Validator
,ValidationEventHandler
,ValidationEvent
,ValidationEventLocator
Field Summary |
---|
Fields inherited from interface javax.xml.bind.ValidationEvent |
---|
ERROR, FATAL_ERROR, WARNING |
Constructor Summary | |
---|---|
ValidationEventImpl(int _severity,
String _message,
ValidationEventLocator _locator)
Create a new ValidationEventImpl. |
|
ValidationEventImpl(int _severity,
String _message,
ValidationEventLocator _locator,
Throwable _linkedException)
Create a new ValidationEventImpl. |
Method Summary | |
---|---|
Throwable |
getLinkedException()
Retrieve the linked exception for this warning/error. |
ValidationEventLocator |
getLocator()
Retrieve the locator for this warning/error. |
String |
getMessage()
Retrieve the text message for this warning/error. |
int |
getSeverity()
Retrieve the severity code for this warning/error. |
void |
setLinkedException(Throwable _linkedException)
Set the linked exception field of this event. |
void |
setLocator(ValidationEventLocator _locator)
Set the locator object for this event. |
void |
setMessage(String _message)
Set the message field of this event. |
void |
setSeverity(int _severity)
Set the severity field of this event. |
String |
toString()
Returns a string representation of this object in a format helpful to debugging. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public
ValidationEventImpl(int _severity, String _message, ValidationEventLocator _locator)
创建新的 ValidationEventImpl。
_severity | 此事件的 severity 值。必须是 ValidationEvent.WARNING、ValidationEvent.ERROR 或 ValidationEvent.FATAL_ERROR 之一 |
_message | 此事件的 Locator 对象,可以为 null。 |
_locator | 一个可以提供事件的其他信息的可选链接异常,可以为 null。 |
Throws | IllegalArgumentException: 如果提供了非法的 severity 字段 |
ValidationEventImpl
public ValidationEventImpl(int _severity, String _message, ValidationEventLocator _locator)
- Create a new ValidationEventImpl.
- Parameters:
_severity
- The severity value for this event. Must be one of ValidationEvent.WARNING, ValidationEvent.ERROR, or ValidationEvent.FATAL_ERROR_message
- The text message for this event - may be null._locator
- The locator object for this event - may be null.- Throws:
IllegalArgumentException
- if an illegal severity field is supplied
public
ValidationEventImpl(int _severity, String _message, ValidationEventLocator _locator, Throwable _linkedException)
创建新的 ValidationEventImpl。
_severity | 此事件的 severity 值。必须是 ValidationEvent.WARNING、ValidationEvent.ERROR 或 ValidationEvent.FATAL_ERROR 之一 |
_message | 此事件的 Locator 对象,可以为 null。 |
_locator | 一个可以提供事件的其他信息的可选链接异常,可以为 null。 |
_linkedException | 一个可以提供事件的其他信息的可选链接异常,可以为 null。 |
Throws | IllegalArgumentException: 如果提供了非法的 severity 字段 |
ValidationEventImpl
public ValidationEventImpl(int _severity, String _message, ValidationEventLocator _locator, Throwable _linkedException)
- Create a new ValidationEventImpl.
- Parameters:
_severity
- The severity value for this event. Must be one of ValidationEvent.WARNING, ValidationEvent.ERROR, or ValidationEvent.FATAL_ERROR_message
- The text message for this event - may be null._locator
- The locator object for this event - may be null._linkedException
- An optional linked exception that may provide additional information about the event - may be null.- Throws:
IllegalArgumentException
- if an illegal severity field is supplied
Method Detail |
---|
public int
getSeverity()
英文文档:
getSeverity
public int getSeverity()
- Description copied from interface:
ValidationEvent
- Retrieve the severity code for this warning/error.
Must be one of ValidationError.WARNING, ValidationError.ERROR, or ValidationError.FATAL_ERROR.
- Specified by:
getSeverity
in interfaceValidationEvent
- Returns:
- the severity code for this warning/error
public void
setSeverity(int _severity)
设置此事件的 severity 字段。
_severity | 必须是 ValidationEvent.WARNING、ValidationEvent.ERROR 或 ValidationEvent.FATAL_ERROR 之一。 |
Throws | IllegalArgumentException: 如果提供了非法的 severity 字段 |
setSeverity
public void setSeverity(int _severity)
- Set the severity field of this event.
- Parameters:
_severity
- Must be one of ValidationEvent.WARNING, ValidationEvent.ERROR, or ValidationEvent.FATAL_ERROR.- Throws:
IllegalArgumentException
- if an illegal severity field is supplied
public String
getMessage()
英文文档:
getMessage
public String getMessage()
- Description copied from interface:
ValidationEvent
- Retrieve the text message for this warning/error.
- Specified by:
getMessage
in interfaceValidationEvent
- Returns:
- the text message for this warning/error or null if one wasn't set
public void
setMessage(String _message)
设置此事件的 message 字段。
_message | 字符串消息,可以为 null。 |
setMessage
public void setMessage(String _message)
- Set the message field of this event.
- Parameters:
_message
- String message - may be null.
public Throwable
getLinkedException()
英文文档:
getLinkedException
public Throwable getLinkedException()
- Description copied from interface:
ValidationEvent
- Retrieve the linked exception for this warning/error.
- Specified by:
getLinkedException
in interfaceValidationEvent
- Returns:
- the linked exception for this warning/error or null if one wasn't set
public void
setLinkedException(Throwable _linkedException)
设置此事件的 linked exception 字段。
_linkedException | 可选链接异常,可以为 null。 |
setLinkedException
public void setLinkedException(Throwable _linkedException)
- Set the linked exception field of this event.
- Parameters:
_linkedException
- Optional linked exception - may be null.
public ValidationEventLocator
getLocator()
英文文档:
getLocator
public ValidationEventLocator getLocator()
- Description copied from interface:
ValidationEvent
- Retrieve the locator for this warning/error.
- Specified by:
getLocator
in interfaceValidationEvent
- Returns:
- the locator that indicates where the warning/error occurred
public void
setLocator(ValidationEventLocator _locator)
设置此事件的 Locator 对象。
_locator | 定位符,可以为 null。 |
setLocator
public void setLocator(ValidationEventLocator _locator)
- Set the locator object for this event.
- Parameters:
_locator
- The locator - may be null.
public String
toString()
以有助于调试的格式返回此对象的字符串表示形式。
See also | equals(Object) |
toString
public String toString()
- Returns a string representation of this object in a format
helpful to debugging.
- See Also:
Object.equals(Object)
|
|||||||||
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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!