Top Description Fields Constructors Methods
org.apache.xerces.stax

public final Class EmptyLocation

extends Object
implements Location
Class Inheritance
All Implemented Interfaces
javax.xml.stream.Location
Imports
javax.xml.stream.Location

Location which always returns -1 and null from its methods.

Version
$Id: EmptyLocation.java 730444 2008-12-31 19:11:29Z mrglavas $

Field Summary

Modifier and TypeField and Description
private static final EmptyLocation
EMPTY_LOCATION_INSTANCE

Singleton instance.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

the current offset
getCharacterOffset
()

Implements javax.xml.stream.Location.getCharacterOffset.

Return the byte or character offset into the input source this location is pointing to.
public int

Returns:

the current column number
getColumnNumber
()

Implements javax.xml.stream.Location.getColumnNumber.

Return the column number where the current event ends, returns -1 if none is available.
public static EmptyLocation
getInstance()

Returns the one and only instance of this class.

public int

Returns:

the current line number
getLineNumber
()

Implements javax.xml.stream.Location.getLineNumber.

Return the line number where the current event ends, returns -1 if none is available.
public String

Returns:

the public ID, or null if not available
getPublicId
()

Implements javax.xml.stream.Location.getPublicId.

Returns the public ID of the XML
public String

Returns:

the system ID, or null if not available
getSystemId
()

Implements javax.xml.stream.Location.getSystemId.

Returns the system ID of the XML
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EMPTY_LOCATION_INSTANCEback to summary
private static final EmptyLocation EMPTY_LOCATION_INSTANCE

Singleton instance.

Constructor Detail

EmptyLocationback to summary
private EmptyLocation()

Method Detail

getCharacterOffsetback to summary
public int getCharacterOffset()

Implements javax.xml.stream.Location.getCharacterOffset.

Return the byte or character offset into the input source this location is pointing to. If the input source is a file or a byte stream then this is the byte offset into that stream, but if the input source is a character media then the offset is the character offset. Returns -1 if there is no offset available.

Returns:int

the current offset

getColumnNumberback to summary
public int getColumnNumber()

Implements javax.xml.stream.Location.getColumnNumber.

Return the column number where the current event ends, returns -1 if none is available.

Returns:int

the current column number

getInstanceback to summary
public static EmptyLocation getInstance()

Returns the one and only instance of this class.

getLineNumberback to summary
public int getLineNumber()

Implements javax.xml.stream.Location.getLineNumber.

Return the line number where the current event ends, returns -1 if none is available.

Returns:int

the current line number

getPublicIdback to summary
public String getPublicId()

Implements javax.xml.stream.Location.getPublicId.

Returns the public ID of the XML

Returns:String

the public ID, or null if not available

getSystemIdback to summary
public String getSystemId()

Implements javax.xml.stream.Location.getSystemId.

Returns the system ID of the XML

Returns:String

the system ID, or null if not available