|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.xml.bind Interface ValidationEventLocator
- All Known Implementing Classes:
- ValidationEventLocatorImpl
public interface ValidationEventLocator
封装 ValidationEvent 的位置。
该 ValidationEventLocator 指示发生 ValidationEvent 的位置。根据检测到错误或警告时将要执行的验证类型来设置不同的字段。例如,按需验证(on-demand validation)应生成包含对 Java 内容树中对象的引用的定位符,而解组时验证(unmarshal-time validation)应生成包含适用于 XML 数据源(文件、url、Node 等)的信息的定位符。
version |
| |
since | JAXB1.0 | |
See also | javax.xml.bind.Validator, javax.xml.bind.ValidationEvent |
Encapsulate the location of a ValidationEvent.
The ValidationEventLocator indicates where the ValidationEvent occurred. Different fields will be set depending on the type of validation that was being performed when the error or warning was detected. For example, on-demand validation would produce locators that contained references to objects in the Java content tree while unmarshal-time validation would produce locators containing information appropriate to the source of the XML data (file, url, Node, etc).
- Since:
- JAXB1.0
- Version:
- $Revision: 1.1 $
- Author:
- Ryan Shoemaker, Sun Microsystems, Inc.
- Kohsuke Kawaguchi, Sun Microsystems, Inc.
- Joe Fialli, Sun Microsystems, Inc.
- See Also:
Validator
,ValidationEvent
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 |
Method Detail |
---|
public java.net.URL
getURL()
返回 URL 形式的 XML 源名称(如果可用)。
return | 返回 URL 形式的 XML 源名称;如果没有可用的名称,则返回 null |
getURL
URL getURL()
- Return the name of the XML source as a URL if available
- Returns:
- the name of the XML source as a URL or null if unavailable
public int
getOffset()
返回字节偏移量(如果可用)。
return | 到输入源的字节偏移量,如果不可用,则返回 -1 |
getOffset
int getOffset()
- Return the byte offset if available
- Returns:
- the byte offset into the input source or -1 if unavailable
public int
getLineNumber()
返回行号(如果可用)。
return | 行号;如果不可用,则返回 -1 |
getLineNumber
int getLineNumber()
- Return the line number if available
- Returns:
- the line number or -1 if unavailable
public int
getColumnNumber()
返回列号(如果可用)。
return | 列号;如果不可用,则返回 -1 |
getColumnNumber
int getColumnNumber()
- Return the column number if available
- Returns:
- the column number or -1 if unavailable
public Object
getObject()
返回对 Java 内容树中对象的引用(如果可用)。
return | 对 Java 内容树中对象的引用;如果不可用,则返回 null |
getObject
Object getObject()
- Return a reference to the object in the Java content tree if available
- Returns:
- a reference to the object in the Java content tree or null if unavailable
public org.w3c.dom.Node
getNode()
返回对 DOM Node 的引用(如果可用)。
return | 对 DOM Node 的引用;如果不可用,则返回 null |
getNode
Node getNode()
- Return a reference to the DOM Node if available
- Returns:
- a reference to the DOM Node or null if unavailable
|
|||||||||
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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!