ValidationEventLocatorImpl (Java EE 5 SDK)

Java

Java EE 5 SDK

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


javax.xml.bind.helpers Class ValidationEventLocatorImpl

java.lang.Object
  extended by javax.xml.bind.helpers.ValidationEventLocatorImpl
所有已实现的接口:
ValidationEventLocator

public class ValidationEventLocatorImpl
extends Object
implements ValidationEventLocator

Default implementation of the ValidationEventLocator interface.

JAXB providers are allowed to use whatever class that implements the ValidationEventLocator interface. This class is just provided for a convenience.

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

构造器摘要
ValidationEventLocatorImpl()
          Creates an object with all fields unavailable.
ValidationEventLocatorImpl(Locator loc)
          Constructs an object from an org.xml.sax.Locator.
ValidationEventLocatorImpl(Node _node)
          Constructs an object that points to a DOM Node.
ValidationEventLocatorImpl(Object _object)
          Constructs an object that points to a JAXB content object.
ValidationEventLocatorImpl(SAXParseException e)
          Constructs an object from the location information of a SAXParseException.
 
方法摘要
 int getColumnNumber()
          Return the column number if available
 int getLineNumber()
          Return the line number if available
 Node getNode()
          Return a reference to the DOM Node if available
 Object getObject()
          Return a reference to the object in the Java content tree if available
 int getOffset()
          Return the byte offset if available
 URL getURL()
          Return the name of the XML source as a URL if available
 void setColumnNumber(int _columnNumber)
          Set the columnNumber field on this event locator.
 void setLineNumber(int _lineNumber)
          Set the lineNumber field on this event locator.
 void setNode(Node _node)
          Set the Node field on this event locator.
 void setObject(Object _object)
          Set the Object field on this event locator.
 void setOffset(int _offset)
          Set the offset field on this event locator.
 void setURL(URL _url)
          Set the URL field on this event locator.
 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
 

构造器详细信息

ValidationEventLocatorImpl

public ValidationEventLocatorImpl()
Creates an object with all fields unavailable.


ValidationEventLocatorImpl

public ValidationEventLocatorImpl(Locator loc)
Constructs an object from an org.xml.sax.Locator. The object's ColumnNumber, LineNumber, and URL become available from the values returned by the locator's getColumnNumber(), getLineNumber(), and getSystemId() methods respectively. Node, Object, and Offset are not available.

参数:
loc - the SAX Locator object that will be used to populate this event locator.
抛出异常:
IllegalArgumentException - if the Locator is null


ValidationEventLocatorImpl

public ValidationEventLocatorImpl(SAXParseException e)
Constructs an object from the location information of a SAXParseException. The object's ColumnNumber, LineNumber, and URL become available from the values returned by the locator's getColumnNumber(), getLineNumber(), and getSystemId() methods respectively. Node, Object, and Offset are not available.

参数:
e - the SAXParseException object that will be used to populate this event locator.
抛出异常:
IllegalArgumentException - if the SAXParseException is null


ValidationEventLocatorImpl

public ValidationEventLocatorImpl(Node _node)
Constructs an object that points to a DOM Node. The object's Node becomes available. ColumnNumber, LineNumber, Object, Offset, and URL are not available.

参数:
_node - the DOM Node object that will be used to populate this event locator.
抛出异常:
IllegalArgumentException - if the Node is null


ValidationEventLocatorImpl

public ValidationEventLocatorImpl(Object _object)
Constructs an object that points to a JAXB content object. The object's Object becomes available. ColumnNumber, LineNumber, Node, Offset, and URL are not available.

参数:
_object - the Object that will be used to populate this event locator.
抛出异常:
IllegalArgumentException - if the Object is null

方法详细信息

getURL

public URL getURL()
Description copied from interface: ValidationEventLocator
Return the name of the XML source as a URL if available

规范说明:
getURL in interface ValidationEventLocator
返回:
the name of the XML source as a URL or null if unavailable
另请参见:
ValidationEventLocator.getURL()

setURL

public void setURL(URL _url)
Set the URL field on this event locator. Null values are allowed.

参数:
_url - the url

getOffset

public int getOffset()
Description copied from interface: ValidationEventLocator
Return the byte offset if available

规范说明:
getOffset in interface ValidationEventLocator
返回:
the byte offset into the input source or -1 if unavailable
另请参见:
ValidationEventLocator.getOffset()

setOffset

public void setOffset(int _offset)
Set the offset field on this event locator.

参数:
_offset - the offset

getLineNumber

public int getLineNumber()
Description copied from interface: ValidationEventLocator
Return the line number if available

规范说明:
getLineNumber in interface ValidationEventLocator
返回:
the line number or -1 if unavailable
另请参见:
ValidationEventLocator.getLineNumber()

setLineNumber

public void setLineNumber(int _lineNumber)
Set the lineNumber field on this event locator.

参数:
_lineNumber - the line number

getColumnNumber

public int getColumnNumber()
Description copied from interface: ValidationEventLocator
Return the column number if available

规范说明:
getColumnNumber in interface ValidationEventLocator
返回:
the column number or -1 if unavailable
另请参见:
ValidationEventLocator.getColumnNumber()

setColumnNumber

public void setColumnNumber(int _columnNumber)
Set the columnNumber field on this event locator.

参数:
_columnNumber - the column number

getObject

public Object getObject()
Description copied from interface: ValidationEventLocator
Return a reference to the object in the Java content tree if available

规范说明:
getObject in interface ValidationEventLocator
返回:
a reference to the object in the Java content tree or null if unavailable
另请参见:
ValidationEventLocator.getObject()

setObject

public void setObject(Object _object)
Set the Object field on this event locator. Null values are allowed.

参数:
_object - the java content object

getNode

public Node getNode()
Description copied from interface: ValidationEventLocator
Return a reference to the DOM Node if available

规范说明:
getNode in interface ValidationEventLocator
返回:
a reference to the DOM Node or null if unavailable
另请参见:
ValidationEventLocator.getNode()

setNode

public void setNode(Node _node)
Set the Node field on this event locator. Null values are allowed.

参数:
_node - the Node

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. 保留所有权利。 请遵守许可证条款。深圳电信培训中心.徐海蛟老师教学参考.