Class InputLocation

java.lang.Object
org.apache.maven.api.settings.InputLocation
All Implemented Interfaces:
Serializable, InputLocationTracker

public class InputLocation extends Object implements Serializable, InputLocationTracker
Class InputLocation.
See Also:
  • Constructor Details

    • InputLocation

      public InputLocation(InputSource source)
    • InputLocation

      public InputLocation(int lineNumber, int columnNumber)
    • InputLocation

      public InputLocation(int lineNumber, int columnNumber, InputSource source)
    • InputLocation

      public InputLocation(int lineNumber, int columnNumber, InputSource source, Object selfLocationKey)
    • InputLocation

      public InputLocation(int lineNumber, int columnNumber, InputSource source, Map<Object,InputLocation> locations)
  • Method Details

    • getLineNumber

      public int getLineNumber()
    • getColumnNumber

      public int getColumnNumber()
    • getSource

      public InputSource getSource()
    • getLocation

      public InputLocation getLocation(Object key)
      Specified by:
      getLocation in interface InputLocationTracker
    • getLocations

      public Map<Object,InputLocation> getLocations()
    • merge

      public static InputLocation merge(InputLocation target, InputLocation source, boolean sourceDominant)
      Merges the source location into the target location.
      Parameters:
      target - the target location
      source - the source location
      sourceDominant - the boolean indicating of source is dominant compared to target
      Returns:
      the merged location
    • merge

      public static InputLocation merge(InputLocation target, InputLocation source, Collection<Integer> indices)
      Merges the source location into the target location. This method is used when the locations refer to lists and also merges the indices.
      Parameters:
      target - the target location
      source - the source location
      indices - the list of integers for the indices
      Returns:
      the merged location