- java.lang.Object
-
- javax.xml.bind.helpers.ValidationEventLocatorImpl
-
- All Implemented Interfaces:
- 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.
- Since:
- JAXB1.0
- See Also:
Validator
,ValidationEventHandler
,ValidationEvent
,ValidationEventLocator
-
-
Constructor Summary
Constructors Constructor and Description 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
Methods Modifier and Type Method and Description int
getColumnNumber()
Return the column number if availableint
getLineNumber()
Return the line number if availableNode
getNode()
Return a reference to the DOM Node if availableObject
getObject()
Return a reference to the object in the Java content tree if availableint
getOffset()
Return the byte offset if availableURL
getURL()
Return the name of the XML source as a URL if availablevoid
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.
-
-
-
Constructor Detail
-
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.- Parameters:
loc
- the SAX Locator object that will be used to populate this event locator.- Throws:
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.- Parameters:
e
- the SAXParseException object that will be used to populate this event locator.- Throws:
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.- Parameters:
_node
- the DOM Node object that will be used to populate this event locator.- Throws:
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.- Parameters:
_object
- the Object that will be used to populate this event locator.- Throws:
IllegalArgumentException
- if the Object is null
-
-
Method Detail
-
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()
-
setURL
public void setURL(URL _url)
Set the URL field on this event locator. Null values are allowed.- Parameters:
_url
- the url
-
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()
-
setOffset
public void setOffset(int _offset)
Set the offset field on this event locator.- Parameters:
_offset
- the offset
-
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()
-
setLineNumber
public void setLineNumber(int _lineNumber)
Set the lineNumber field on this event locator.- Parameters:
_lineNumber
- the line number
-
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()
-
setColumnNumber
public void setColumnNumber(int _columnNumber)
Set the columnNumber field on this event locator.- Parameters:
_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- Specified by:
getObject
in interfaceValidationEventLocator
- Returns:
- a reference to the object in the Java content tree or null if unavailable
- See Also:
ValidationEventLocator.getObject()
-
setObject
public void setObject(Object _object)
Set the Object field on this event locator. Null values are allowed.- Parameters:
_object
- the java content object
-
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()
-
setNode
public void setNode(Node _node)
Set the Node field on this event locator. Null values are allowed.- Parameters:
_node
- the Node
-
toString
public String toString()
Returns a string representation of this object in a format helpful to debugging.- Overrides:
toString
in classObject
- Returns:
- a string representation of the object.
- See Also:
Object.equals(Object)
-
-
Nederlandse vertaling
U hebt gevraagd om deze site in het Nederlands te bezoeken. Voor nu wordt alleen de interface vertaald, maar nog niet alle inhoud.Als je me wilt helpen met vertalingen, is je bijdrage welkom. Het enige dat u hoeft te doen, is u op de site registreren en mij een bericht sturen waarin u wordt gevraagd om u toe te voegen aan de groep vertalers, zodat u de gewenste pagina's kunt vertalen. Een link onderaan elke vertaalde pagina geeft aan dat u de vertaler bent en heeft een link naar uw profiel.
Bij voorbaat dank.
Document heeft de 11/06/2005 gemaakt, de laatste keer de 04/03/2020 gewijzigd
Bron van het afgedrukte document:https://www.gaudry.be/nl/java-api-rf-javax/xml/bind/helpers/ValidationEventLocatorImpl.html
De infobrol is een persoonlijke site waarvan de inhoud uitsluitend mijn verantwoordelijkheid is. De tekst is beschikbaar onder CreativeCommons-licentie (BY-NC-SA). Meer info op de gebruiksvoorwaarden en de auteur.
Referenties
Deze verwijzingen en links verwijzen naar documenten die geraadpleegd zijn tijdens het schrijven van deze pagina, of die aanvullende informatie kunnen geven, maar de auteurs van deze bronnen kunnen niet verantwoordelijk worden gehouden voor de inhoud van deze pagina.
De auteur Deze site is als enige verantwoordelijk voor de manier waarop de verschillende concepten, en de vrijheden die met de referentiewerken worden genomen, hier worden gepresenteerd. Vergeet niet dat u meerdere broninformatie moet doorgeven om het risico op fouten te verkleinen.