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:
  • Constructor Details

    • InputLocation

      public InputLocation(InputLocation location)
    • InputLocation

      public InputLocation(int lineNumber, int columnNumber)
    • InputLocation

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

    • clone

      public InputLocation clone()
      Method clone.
      Overrides:
      clone in class 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(Object key)
      Description copied from interface: InputLocationTracker
      Gets the location of the specified field in the input source.
      Specified by:
      getLocation in interface InputLocationTracker
      Parameters:
      key -
      Returns:
      InputLocation
    • getLocations

      public Map<Object,InputLocation> getLocations()
      Returns:
      Map
    • setLocation

      public void setLocation(Object key, InputLocation location)
      Description copied from interface: InputLocationTracker
      Sets the location of the specified field.
      Specified by:
      setLocation in interface InputLocationTracker
      Parameters:
      key -
      location -
    • setOtherLocation

      public void setOtherLocation(Object key, InputLocation location)
      Parameters:
      key -
      location -
    • getSource

      public InputSource getSource()
      Get the source field.
      Returns:
      InputSource
    • getImportedFrom

      public InputLocation getImportedFrom()
      Gets the parent InputLocation where this InputLocation may have been imported from. Can return null.
      Returns:
      InputLocation
      Since:
      4.0.0
    • setImportedFrom

      public void setImportedFrom(InputLocation importedFrom)
      Set the imported from location.
      Parameters:
      importedFrom -
    • 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, Collection<Integer> indices)
      Method merge.
      Parameters:
      target -
      indices -
      source -
      Returns:
      InputLocation
    • setLocations

      public void setLocations(Map<Object,InputLocation> locations)
      Parameters:
      locations -
    • toApiLocation

      public InputLocation toApiLocation()
    • toString

      public String toString()
      Overrides:
      toString in class Object