|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.xml.bind.helpers Class ValidationEventLocatorImpl
java.lang.Object javax.xml.bind.helpers.ValidationEventLocatorImpl
- All Implemented Interfaces:
- ValidationEventLocator
public class ValidationEventLocatorImpl
- extends Object
- implements ValidationEventLocator
ValidationEventLocator 接口的默认实现。
允许 JAXB 提供者使用实现了 ValidationEventLocator 接口的任何类。提供此类只是为了方便使用。
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 ValidationEventLocator interface.
JAXB providers are allowed to use whatever class that implements the ValidationEventLocator interface. This class is just provided for a convenience.
- Since:
- JAXB1.0
- Version:
- $Revision: 1.2 $
- Author:
- Kohsuke Kawaguchi, Sun Microsystems, Inc.
- See Also:
Validator
,ValidationEventHandler
,ValidationEvent
,ValidationEventLocator
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public
ValidationEventLocatorImpl()
创建所有字段都不可用的对象。
英文文档:
ValidationEventLocatorImpl
public ValidationEventLocatorImpl()
- Creates an object with all fields unavailable.
public
ValidationEventLocatorImpl(org.xml.sax.Locator loc)
根据 org.xml.sax.Locator 构造一个对象。
对象的 ColumnNumber、LineNumber 和 URL 可以分别从 Locator 的 getColumnNumber()、getLineNumber() 和 getSystemId() 方法的返回值得到。而 Node、Object 和 Offset 均不可用。
loc | 用于填充此事件定位符的 SAX Locator 对象。 |
Throws | IllegalArgumentException: 如果 Locator 为 null |
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.
- Parameters:
loc
- the SAX Locator object that will be used to populate this event locator.- Throws:
IllegalArgumentException
- if the Locator is null
public
ValidationEventLocatorImpl(org.xml.sax.SAXParseException e)
根据 SAXParseException 的位置信息构造一个对象。
对象的 ColumnNumber、LineNumber 和 URL 可以分别从 Locator 的 getColumnNumber()、getLineNumber() 和 getSystemId() 方法的返回值得到。而 Node、Object 和 Offset 均不可用。
e | 用于填充此事件定位符的 SAXParseException 对象。 |
Throws | IllegalArgumentException: 如果 SAXParseException 为 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.
- Parameters:
e
- the SAXParseException object that will be used to populate this event locator.- Throws:
IllegalArgumentException
- if the SAXParseException is null
public
ValidationEventLocatorImpl(org.w3c.dom.Node _node)
构造一个指向 DOM Node 的对象。
该对象的 Node 变得可用。ColumnNumber、LineNumber、Object、Offset 和 URL 不可用。
_node | 用于填充此事件定位符的 DOM Node 对象。 |
Throws | IllegalArgumentException: 如果 Node 为 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.
- Parameters:
_node
- the DOM Node object that will be used to populate this event locator.- Throws:
IllegalArgumentException
- if the Node is null
public
ValidationEventLocatorImpl(Object _object)
构造一个指向 JAXB 内容对象的对象。
该对象的 Object 变得可用。ColumnNumber、LineNumber、Node、Offset 和 URL 不可用。
_object | 用于填充此事件定位符的 Object。 |
Throws | IllegalArgumentException: 如果 Object 为 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.
- Parameters:
_object
- the Object that will be used to populate this event locator.- Throws:
IllegalArgumentException
- if the Object is null
Method Detail |
---|
public java.net.URL
getURL()
See also | getURL() |
getURL
public URL getURL()
- Description copied from interface:
ValidationEventLocator
- Return the name of the XML source as a URL if available
- Specified by:
getURL
in interfaceValidationEventLocator
- Returns:
- the name of the XML source as a URL or null if unavailable
- See Also:
ValidationEventLocator.getURL()
public void
setURL(java.net.URL _url)
在此事件定位符上设置 URL 字段。允许使用 null 值。
_url | URL |
setURL
public void setURL(URL _url)
- Set the URL field on this event locator. Null values are allowed.
- Parameters:
_url
- the url
public int
getOffset()
See also | getOffset() |
getOffset
public int getOffset()
- Description copied from interface:
ValidationEventLocator
- Return the byte offset if available
- Specified by:
getOffset
in interfaceValidationEventLocator
- Returns:
- the byte offset into the input source or -1 if unavailable
- See Also:
ValidationEventLocator.getOffset()
public void
setOffset(int _offset)
在此事件定位符上设置 offset 字段。
_offset | 偏移量 |
setOffset
public void setOffset(int _offset)
- Set the offset field on this event locator.
- Parameters:
_offset
- the offset
public int
getLineNumber()
See also | getLineNumber() |
getLineNumber
public int getLineNumber()
- Description copied from interface:
ValidationEventLocator
- Return the line number if available
- Specified by:
getLineNumber
in interfaceValidationEventLocator
- Returns:
- the line number or -1 if unavailable
- See Also:
ValidationEventLocator.getLineNumber()
public void
setLineNumber(int _lineNumber)
在此事件定位符上设置 lineNumber 字段。
_lineNumber | 行数 |
setLineNumber
public void setLineNumber(int _lineNumber)
- Set the lineNumber field on this event locator.
- Parameters:
_lineNumber
- the line number
public int
getColumnNumber()
See also | getColumnNumber() |
getColumnNumber
public int getColumnNumber()
- Description copied from interface:
ValidationEventLocator
- Return the column number if available
- Specified by:
getColumnNumber
in interfaceValidationEventLocator
- Returns:
- the column number or -1 if unavailable
- See Also:
ValidationEventLocator.getColumnNumber()
public void
setColumnNumber(int _columnNumber)
在此事件定位符上设置 columnNumber 字段。
_columnNumber | 列数 |
setColumnNumber
public void setColumnNumber(int _columnNumber)
- Set the columnNumber field on this event locator.
- Parameters:
_columnNumber
- the column number
public Object
getObject()
See also | getObject() |
getObject
public Object getObject()
- Description copied from interface:
ValidationEventLocator
- Return a reference to the object in the Java content tree if available
- Specified by:
getObject
in interfaceValidationEventLocator
- Returns:
- a reference to the object in the Java content tree or null if unavailable
- See Also:
ValidationEventLocator.getObject()
public void
setObject(Object _object)
在此事件定位符上设置 Object 字段。允许使用 null 值。
_object | java 内容对象 |
setObject
public void setObject(Object _object)
- Set the Object field on this event locator. Null values are allowed.
- Parameters:
_object
- the java content object
public org.w3c.dom.Node
getNode()
See also | getNode() |
getNode
public Node getNode()
- Description copied from interface:
ValidationEventLocator
- Return a reference to the DOM Node if available
- Specified by:
getNode
in interfaceValidationEventLocator
- Returns:
- a reference to the DOM Node or null if unavailable
- See Also:
ValidationEventLocator.getNode()
public void
setNode(org.w3c.dom.Node _node)
在此事件定位符上设置 Node 字段。允许使用 null 值。
_node | 节点 |
setNode
public void setNode(Node _node)
- Set the Node field on this event locator. Null values are allowed.
- Parameters:
_node
- the Node
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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!