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.
Validator
, ValidationEventHandler
, ValidationEvent
, ValidationEventLocator
public ValidationEventLocatorImpl()
Creates an object with all fields unavailable.
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 nullpublic 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 nullpublic 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 nullpublic 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 nullpublic URL getURL()
Description copied from interface: ValidationEventLocator
Return the name of the XML source as a URL if available
getURL
in interface ValidationEventLocator
ValidationEventLocator.getURL()
public void setURL(URL _url)
Set the URL field on this event locator. Null values are allowed.
_url
- the urlpublic int getOffset()
Description copied from interface: ValidationEventLocator
Return the byte offset if available
getOffset
in interface ValidationEventLocator
ValidationEventLocator.getOffset()
public void setOffset(int _offset)
Set the offset field on this event locator.
_offset
- the offsetpublic int getLineNumber()
Description copied from interface: ValidationEventLocator
Return the line number if available
getLineNumber
in interface ValidationEventLocator
ValidationEventLocator.getLineNumber()
public void setLineNumber(int _lineNumber)
Set the lineNumber field on this event locator.
_lineNumber
- the line numberpublic int getColumnNumber()
Description copied from interface: ValidationEventLocator
Return the column number if available
getColumnNumber
in interface ValidationEventLocator
ValidationEventLocator.getColumnNumber()
public void setColumnNumber(int _columnNumber)
Set the columnNumber field on this event locator.
_columnNumber
- the column numberpublic Object getObject()
Description copied from interface: ValidationEventLocator
Return a reference to the object in the Java content tree if available
getObject
in interface ValidationEventLocator
ValidationEventLocator.getObject()
public void setObject(Object _object)
Set the Object field on this event locator. Null values are allowed.
_object
- the java content objectpublic Node getNode()
Description copied from interface: ValidationEventLocator
Return a reference to the DOM Node if available
getNode
in interface ValidationEventLocator
ValidationEventLocator.getNode()
public void setNode(Node _node)
Set the Node field on this event locator. Null values are allowed.
_node
- the Nodepublic String toString()
Returns a string representation of this object in a format helpful to debugging.
toString
in class Object
Object.equals(Object)
© 1993–2017, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.