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 classClass StringFormatter. -
Constructor Summary
ConstructorsConstructorDescriptionInputLocation(int lineNumber, int columnNumber) InputLocation(int lineNumber, int columnNumber, InputSource source) InputLocation(InputLocation location) -
Method Summary
Modifier and TypeMethodDescriptionclone()Method clone.intGet the one-based column number.Gets the parent InputLocation where this InputLocation may have been imported from.intGet the one-based line number.getLocation(Object key) Gets the location of the specified field in the input source.Get the source field.static InputLocationmerge(InputLocation target, InputLocation source, boolean sourceDominant) Method merge.static InputLocationmerge(InputLocation target, InputLocation source, Collection<Integer> indices) Method merge.voidsetImportedFrom(InputLocation importedFrom) Set the imported from location.voidsetLocation(Object key, InputLocation location) Sets the location of the specified field.voidsetLocations(Map<Object, InputLocation> locations) voidsetOtherLocation(Object key, InputLocation location) toString()
-
Constructor Details
-
InputLocation
-
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:InputLocationTrackerGets the location of the specified field in the input source.- Specified by:
getLocationin interfaceInputLocationTracker- Parameters:
key-- Returns:
- InputLocation
-
getLocations
- Returns:
- Map
-
setLocation
Description copied from interface:InputLocationTrackerSets the location of the specified field.- Specified by:
setLocationin interfaceInputLocationTracker- Parameters:
key-location-
-
setOtherLocation
- Parameters:
key-location-
-
getSource
Get the source field.- Returns:
- InputSource
-
getImportedFrom
Gets the parent InputLocation where this InputLocation may have been imported from. Can returnnull.- Returns:
- InputLocation
- Since:
- 4.0.0
-
setImportedFrom
Set the imported from location.- Parameters:
importedFrom-
-
merge
public static InputLocation merge(InputLocation target, InputLocation source, boolean sourceDominant) Method merge.- Parameters:
target-source-sourceDominant-- Returns:
- InputLocation
-
merge
public static InputLocation merge(InputLocation target, InputLocation source, Collection<Integer> indices) Method merge.- Parameters:
target-source-indices-- Returns:
- InputLocation
-
setLocations
- Parameters:
locations-
-
toApiLocation
-
toString
-