Package org.apache.maven.model
Class InputLocation
java.lang.Object
org.apache.maven.model.InputLocation
- All Implemented Interfaces:
Serializable
,Cloneable
,InputLocationTracker
public final class InputLocation
extends Object
implements Serializable, Cloneable, InputLocationTracker
Class InputLocation.
- Version:
- $Revision$ $Date$
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Class StringFormatter. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
The one-based column number.private int
The one-based line number.private InputLocation
Field location.private Map<Object,
InputLocation> Field locations.private InputSource
Field source. -
Constructor Summary
ConstructorsConstructorDescriptionInputLocation
(int lineNumber, int columnNumber) InputLocation
(int lineNumber, int columnNumber, InputSource source) -
Method Summary
Modifier and TypeMethodDescriptionclone()
Method clone.int
Get the one-based column number.int
Get the one-based line number.getLocation
(Object key) Gets the location of the specified field in the input source.private InputLocation
getOtherLocation
(Object key) Get the source field.static InputLocation
merge
(InputLocation target, InputLocation source, boolean sourceDominant) Method merge.static InputLocation
merge
(InputLocation target, InputLocation source, Collection<Integer> indices) Method merge.void
setLocation
(Object key, InputLocation location) Sets the location of the specified field.void
setLocations
(Map<Object, InputLocation> locations) void
setOtherLocation
(Object key, InputLocation location) toString()
-
Field Details
-
lineNumber
private int lineNumberThe one-based line number. The value will be non-positive if unknown. -
columnNumber
private int columnNumberThe one-based column number. The value will be non-positive if unknown. -
source
Field source. -
locations
Field locations. -
location
Field location.
-
-
Constructor Details
-
InputLocation
public InputLocation(int lineNumber, int columnNumber) -
InputLocation
-
-
Method Details
-
clone
Method clone. -
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
Description copied from interface:InputLocationTracker
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
- Parameters:
key
- a key object.- Returns:
- InputLocation
-
getLocations
- Returns:
- Map
-
setLocation
Description copied from interface:InputLocationTracker
Sets the location of the specified field.- Specified by:
setLocation
in interfaceInputLocationTracker
- Parameters:
key
- a key object.location
- a location object.
-
setOtherLocation
- Parameters:
key
- a key object.location
- a location object.
-
getOtherLocation
- Parameters:
key
- a key object.- Returns:
- InputLocation
-
getSource
Get the source field.- Returns:
- InputSource
-
merge
public static InputLocation merge(InputLocation target, InputLocation source, boolean sourceDominant) Method merge.- Parameters:
target
- a target object.sourceDominant
- a sourceDominant object.source
- a source object.- Returns:
- InputLocation
-
merge
public static InputLocation merge(InputLocation target, InputLocation source, Collection<Integer> indices) Method merge.- Parameters:
target
- a target object.indices
- a indices object.source
- a source object.- Returns:
- InputLocation
-
setLocations
- Parameters:
locations
- a locations object.
-
toString
-