ValidationEventImpl (Java EE 5 SDK)

Java

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


javax.xml.bind.helpers Class ValidationEventImpl

java.lang.Object
  extended by javax.xml.bind.helpers.ValidationEventImpl
所有已实现的接口:
ValidationEvent
直接已知子类:
NotIdentifiableEventImpl, ParseConversionEventImpl, PrintConversionEventImpl

public class ValidationEventImpl
extends Object
implements ValidationEvent

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.

从以下版本开始:
JAXB1.0
版本:
$Revision: 1.1 $
作者:
  • Kohsuke Kawaguchi, Sun Microsystems, Inc.
另请参见:
Validator, ValidationEventHandler, ValidationEvent, ValidationEventLocator

字段摘要
 
Fields inherited from interface javax.xml.bind.ValidationEvent
ERROR, FATAL_ERROR, WARNING
 
构造器摘要
ValidationEventImpl(int _severity, String _message, ValidationEventLocator _locator)
          Create a new ValidationEventImpl.
ValidationEventImpl(int _severity, String _message, ValidationEventLocator _locator, Throwable _linkedException)
          Create a new ValidationEventImpl.
 
方法摘要
 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.
 
类方法继承 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

构造器详细信息

ValidationEventImpl

public ValidationEventImpl(int _severity,
                           String _message,
                           ValidationEventLocator _locator)
Create a new ValidationEventImpl.

参数:
_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.
抛出异常:
IllegalArgumentException - if an illegal severity field is supplied


ValidationEventImpl

public ValidationEventImpl(int _severity,
                           String _message,
                           ValidationEventLocator _locator,
                           Throwable _linkedException)
Create a new ValidationEventImpl.

参数:
_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.
抛出异常:
IllegalArgumentException - if an illegal severity field is supplied

方法详细信息

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.

规范说明:
getSeverity in interface ValidationEvent
返回:
the severity code for this warning/error

setSeverity

public void setSeverity(int _severity)
Set the severity field of this event.

参数:
_severity - Must be one of ValidationEvent.WARNING, ValidationEvent.ERROR, or ValidationEvent.FATAL_ERROR.
抛出异常:
IllegalArgumentException - if an illegal severity field is supplied

getMessage

public String getMessage()
Description copied from interface: ValidationEvent
Retrieve the text message for this warning/error.

规范说明:
getMessage in interface ValidationEvent
返回:
the text message for this warning/error or null if one wasn't set

setMessage

public void setMessage(String _message)
Set the message field of this event.

参数:
_message - String message - may be null.

getLinkedException

public Throwable getLinkedException()
Description copied from interface: ValidationEvent
Retrieve the linked exception for this warning/error.

规范说明:
getLinkedException in interface ValidationEvent
返回:
the linked exception for this warning/error or null if one wasn't set

setLinkedException

public void setLinkedException(Throwable _linkedException)
Set the linked exception field of this event.

参数:
_linkedException - Optional linked exception - may be null.

getLocator

public ValidationEventLocator getLocator()
Description copied from interface: ValidationEvent
Retrieve the locator for this warning/error.

规范说明:
getLocator in interface ValidationEvent
返回:
the locator that indicates where the warning/error occurred

setLocator

public void setLocator(ValidationEventLocator _locator)
Set the locator object for this event.

参数:
_locator - The locator - may be null.

toString

public String toString()
Returns a string representation of this object in a format helpful to debugging.

重写:
toString in class Object
另请参见:
Object.equals(Object)

Java EE 5 SDK

深圳电信培训中心.徐海蛟老师.


提交错误或意见

版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.