public class InputLocation extends Object implements Serializable, InputLocationTracker
Modifier and Type | Class and Description |
---|---|
static interface |
InputLocation.StringFormatter
Class StringFormatter.
|
Constructor and Description |
---|
InputLocation(InputSource source) |
InputLocation(int lineNumber,
int columnNumber) |
InputLocation(int lineNumber,
int columnNumber,
InputSource source) |
InputLocation(int lineNumber,
int columnNumber,
InputSource source,
Map<Object,InputLocation> locations) |
InputLocation(int lineNumber,
int columnNumber,
InputSource source,
Object selfLocationKey) |
Modifier and Type | Method and Description |
---|---|
int |
getColumnNumber() |
int |
getLineNumber() |
InputLocation |
getLocation(Object key) |
Map<Object,InputLocation> |
getLocations() |
InputSource |
getSource() |
static InputLocation |
merge(InputLocation target,
InputLocation source,
boolean sourceDominant)
Merges the
source location into the target location. |
static InputLocation |
merge(InputLocation target,
InputLocation source,
Collection<Integer> indices)
Merges the
source location into the target location. |
public InputLocation(InputSource source)
public InputLocation(int lineNumber, int columnNumber)
public InputLocation(int lineNumber, int columnNumber, InputSource source)
public InputLocation(int lineNumber, int columnNumber, InputSource source, Object selfLocationKey)
public InputLocation(int lineNumber, int columnNumber, InputSource source, Map<Object,InputLocation> locations)
public int getLineNumber()
public int getColumnNumber()
public InputSource getSource()
public InputLocation getLocation(Object key)
getLocation
in interface InputLocationTracker
public Map<Object,InputLocation> getLocations()
public static InputLocation merge(InputLocation target, InputLocation source, boolean sourceDominant)
source
location into the target
location.target
- the target locationsource
- the source locationsourceDominant
- the boolean indicating of source
is dominant compared to target
public static InputLocation merge(InputLocation target, InputLocation source, Collection<Integer> indices)
source
location into the target
location.
This method is used when the locations refer to lists and also merges the indices.target
- the target locationsource
- the source locationindices
- the list of integers for the indicesCopyright © 2001–2022 The Apache Software Foundation. All rights reserved.