public final class InputLocation extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable, InputLocationTracker
Modifier and Type | Class and Description |
---|---|
static class |
InputLocation.StringFormatter
Class StringFormatter.
|
Modifier and Type | Field and Description |
---|---|
private int |
columnNumber
The one-based column number.
|
private int |
lineNumber
The one-based line number.
|
private InputLocation |
location
Field location.
|
private java.util.Map<java.lang.Object,InputLocation> |
locations
Field locations.
|
private InputSource |
source
Field source.
|
Constructor and Description |
---|
InputLocation(int lineNumber,
int columnNumber) |
InputLocation(int lineNumber,
int columnNumber,
InputSource source) |
Modifier and Type | Method and Description |
---|---|
InputLocation |
clone()
Method clone.
|
int |
getColumnNumber()
Get the one-based column number.
|
int |
getLineNumber()
Get the one-based line number.
|
InputLocation |
getLocation(java.lang.Object key)
Gets the location of the specified field in the input
source.
|
java.util.Map<java.lang.Object,InputLocation> |
getLocations() |
private InputLocation |
getOtherLocation(java.lang.Object key) |
InputSource |
getSource()
Get the source field.
|
static InputLocation |
merge(InputLocation target,
InputLocation source,
boolean sourceDominant)
Method merge.
|
static InputLocation |
merge(InputLocation target,
InputLocation source,
java.util.Collection<java.lang.Integer> indices)
Method merge.
|
void |
setLocation(java.lang.Object key,
InputLocation location)
Sets the location of the specified field.
|
void |
setLocations(java.util.Map<java.lang.Object,InputLocation> locations) |
void |
setOtherLocation(java.lang.Object key,
InputLocation location) |
java.lang.String |
toString() |
private int lineNumber
private int columnNumber
private InputSource source
private java.util.Map<java.lang.Object,InputLocation> locations
private InputLocation location
public InputLocation(int lineNumber, int columnNumber)
public InputLocation(int lineNumber, int columnNumber, InputSource source)
public InputLocation clone()
clone
in class java.lang.Object
public int getColumnNumber()
public int getLineNumber()
public InputLocation getLocation(java.lang.Object key)
InputLocationTracker
getLocation
in interface InputLocationTracker
key
- a key object.public java.util.Map<java.lang.Object,InputLocation> getLocations()
public void setLocation(java.lang.Object key, InputLocation location)
InputLocationTracker
setLocation
in interface InputLocationTracker
key
- a key object.location
- a location object.public void setOtherLocation(java.lang.Object key, InputLocation location)
key
- a key object.location
- a location object.private InputLocation getOtherLocation(java.lang.Object key)
key
- a key object.public InputSource getSource()
public static InputLocation merge(InputLocation target, InputLocation source, boolean sourceDominant)
target
- a target object.sourceDominant
- a sourceDominant object.source
- a source object.public static InputLocation merge(InputLocation target, InputLocation source, java.util.Collection<java.lang.Integer> indices)
target
- a target object.indices
- a indices object.source
- a source object.public void setLocations(java.util.Map<java.lang.Object,InputLocation> locations)
locations
- a locations object.public java.lang.String toString()
toString
in class java.lang.Object