Package org.apache.maven.model
Class InputLocation
- java.lang.Object
-
- org.apache.maven.model.InputLocation
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,InputLocationTracker
public final class InputLocation extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable, InputLocationTracker
Class InputLocation.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInputLocation.StringFormatterClass StringFormatter.
-
Field Summary
Fields Modifier and Type Field Description private intcolumnNumberThe one-based column number.private intlineNumberThe one-based line number.private InputLocationlocationField location.private java.util.Map<java.lang.Object,InputLocation>locationsField locations.private InputSourcesourceField source.
-
Constructor Summary
Constructors Constructor Description InputLocation(int lineNumber, int columnNumber)InputLocation(int lineNumber, int columnNumber, InputSource source)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InputLocationclone()Method clone.intgetColumnNumber()Get the one-based column number.intgetLineNumber()Get the one-based line number.InputLocationgetLocation(java.lang.Object key)Gets the location of the specified field in the input source.java.util.Map<java.lang.Object,InputLocation>getLocations()private InputLocationgetOtherLocation(java.lang.Object key)InputSourcegetSource()Get the source field.static InputLocationmerge(InputLocation target, InputLocation source, boolean sourceDominant)Method merge.static InputLocationmerge(InputLocation target, InputLocation source, java.util.Collection<java.lang.Integer> indices)Method merge.voidsetLocation(java.lang.Object key, InputLocation location)Sets the location of the specified field.voidsetLocations(java.util.Map<java.lang.Object,InputLocation> locations)voidsetOtherLocation(java.lang.Object key, InputLocation location)java.lang.StringtoString()
-
-
-
Field Detail
-
lineNumber
private int lineNumber
The one-based line number. The value will be non-positive if unknown.
-
columnNumber
private int columnNumber
The one-based column number. The value will be non-positive if unknown.
-
source
private InputSource source
Field source.
-
locations
private java.util.Map<java.lang.Object,InputLocation> locations
Field locations.
-
location
private InputLocation location
Field location.
-
-
Constructor Detail
-
InputLocation
public InputLocation(int lineNumber, int columnNumber)
-
InputLocation
public InputLocation(int lineNumber, int columnNumber, InputSource source)
-
-
Method Detail
-
clone
public InputLocation clone()
Method clone.- Overrides:
clonein classjava.lang.Object- Returns:
- InputLocation
-
getColumnNumber
public int getColumnNumber()
Get the one-based column number. The value will be non-positive if unknown.- Returns:
- int
-
getLineNumber
public int getLineNumber()
Get the one-based line number. The value will be non-positive if unknown.- Returns:
- int
-
getLocation
public InputLocation getLocation(java.lang.Object key)
Description copied from interface:InputLocationTrackerGets the location of the specified field in the input source.- Specified by:
getLocationin interfaceInputLocationTracker- Parameters:
key-- Returns:
- InputLocation
-
getLocations
public java.util.Map<java.lang.Object,InputLocation> getLocations()
- Returns:
- Map
-
setLocation
public void setLocation(java.lang.Object key, InputLocation location)Description copied from interface:InputLocationTrackerSets the location of the specified field.- Specified by:
setLocationin interfaceInputLocationTracker- Parameters:
key-location-
-
setOtherLocation
public void setOtherLocation(java.lang.Object key, InputLocation location)- Parameters:
key-location-
-
getOtherLocation
private InputLocation getOtherLocation(java.lang.Object key)
- Parameters:
key-- Returns:
- InputLocation
-
getSource
public InputSource getSource()
Get the source field.- Returns:
- InputSource
-
merge
public static InputLocation merge(InputLocation target, InputLocation source, boolean sourceDominant)
Method merge.- Parameters:
target-sourceDominant-source-- Returns:
- InputLocation
-
merge
public static InputLocation merge(InputLocation target, InputLocation source, java.util.Collection<java.lang.Integer> indices)
Method merge.- Parameters:
target-indices-source-- Returns:
- InputLocation
-
setLocations
public void setLocations(java.util.Map<java.lang.Object,InputLocation> locations)
- Parameters:
locations-
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-