# Locator2Impl

public class **Locator2Impl** extends [LocatorImpl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/LocatorImpl.html)  
implements [Locator2](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Locator2.html) SAX2 extension helper for holding additional Entity information,
implementing the `https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Locator2.html` interface.

> *This module, both source code and documentation, is in the
> Public Domain, and comes with **NO WARRANTY**.*

This is not part of core-only SAX2 distributions.

<br />

### Public Constructor Summary

|---|---|
|   | [Locator2Impl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Locator2Impl.html#Locator2Impl())() Construct a new, empty Locator2Impl object. |
|   | [Locator2Impl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Locator2Impl.html#Locator2Impl(org.xml.sax.Locator))([Locator](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/Locator.html) locator) Copy an existing Locator or Locator2 object. |

### Public Method Summary

|---|---|
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getEncoding](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Locator2Impl.html#getEncoding())() Returns the current value of the encoding property. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getXMLVersion](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Locator2Impl.html#getXMLVersion())() Returns the current value of the version property. |
| void | [setEncoding](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Locator2Impl.html#setEncoding(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) encoding) Assigns the current value of the encoding property. |
| void | [setXMLVersion](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Locator2Impl.html#setXMLVersion(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) version) Assigns the current value of the version property. |

### Inherited Method Summary

From class [org.xml.sax.helpers.LocatorImpl](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/LocatorImpl.html)

|---|---|
| int | [getColumnNumber](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/LocatorImpl.html#getColumnNumber())() Return the saved column number (1-based). |
| int | [getLineNumber](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/LocatorImpl.html#getLineNumber())() Return the saved line number (1-based). |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getPublicId](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/LocatorImpl.html#getPublicId())() Return the saved public identifier. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getSystemId](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/LocatorImpl.html#getSystemId())() Return the saved system identifier. |
| void | [setColumnNumber](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/LocatorImpl.html#setColumnNumber(int))(int columnNumber) Set the column number for this locator (1-based). |
| void | [setLineNumber](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/LocatorImpl.html#setLineNumber(int))(int lineNumber) Set the line number for this locator (1-based). |
| void | [setPublicId](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/LocatorImpl.html#setPublicId(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) publicId) Set the public identifier for this locator. |
| void | [setSystemId](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/helpers/LocatorImpl.html#setSystemId(java.lang.String))([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) systemId) Set the system identifier for this locator. |

From class [java.lang.Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html)

|---|---|
| [Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) | [clone](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |
| boolean | [equals](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#equals(java.lang.Object))([Object](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |
| void | [finalize](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |
| final [Class](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html)\<?\> | [getClass](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#getClass())() Returns the unique instance of `https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Class.html` that represents this object's class. |
| int | [hashCode](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |
| final void | [notify](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| final void | [notifyAll](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |
| [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [toString](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |
| final void | [wait](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |

From interface [org.xml.sax.Locator](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/Locator.html)

|---|---|
| abstract int | [getColumnNumber](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/Locator.html#getColumnNumber())() Return the column number where the current document event ends. |
| abstract int | [getLineNumber](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/Locator.html#getLineNumber())() Return the line number where the current document event ends. |
| abstract [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getPublicId](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/Locator.html#getPublicId())() Return the public identifier for the current document event. |
| abstract [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getSystemId](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/Locator.html#getSystemId())() Return the system identifier for the current document event. |

From interface [org.xml.sax.ext.Locator2](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Locator2.html)

|---|---|
| abstract [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getEncoding](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Locator2.html#getEncoding())() Returns the name of the character encoding for the entity. |
| abstract [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) | [getXMLVersion](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Locator2.html#getXMLVersion())() Returns the version of XML used for the entity. |

## Public Constructors

#### public
**Locator2Impl**
()

Construct a new, empty Locator2Impl object.
This will not normally be useful, since the main purpose
of this class is to make a snapshot of an existing Locator.

#### public
**Locator2Impl**
([Locator](https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/Locator.html) locator)

Copy an existing Locator or Locator2 object.
If the object implements Locator2, values of the
*encoding* and *version* strings are copied,
otherwise they set to *null*.

##### Parameters

| locator | The existing Locator object. |
|---|---|

## Public Methods

#### public [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html)
**getEncoding**
()

Returns the current value of the encoding property.

##### Returns

- the current value of the encoding property.

##### See Also

- `https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Locator2Impl.html#setEncoding(java.lang.String)`

#### public [String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html)
**getXMLVersion**
()

Returns the current value of the version property.

##### Returns

- the current value of the version property.

##### See Also

- `https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Locator2Impl.html#setXMLVersion(java.lang.String)`

#### public void
**setEncoding**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) encoding)

Assigns the current value of the encoding property.

##### Parameters

| encoding | the new "encoding" value |
|---|---|

##### See Also

- `https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Locator2Impl.html#getEncoding()`

#### public void
**setXMLVersion**
([String](https://developers.google.com/j2objc/javadoc/jre/reference/java/lang/String.html) version)

Assigns the current value of the version property.

##### Parameters

| version | the new "version" value |
|---|---|

##### See Also

- `https://developers.google.com/j2objc/javadoc/jre/reference/org/xml/sax/ext/Locator2Impl.html#getXMLVersion()`