Class InputSource

java.lang.Object
org.apache.maven.api.model.InputSource
All Implemented Interfaces:
Serializable

public class InputSource extends Object implements Serializable
Represents the source of a model input, such as a POM file.

This class tracks the origin of model elements, including their ___location in source files and relationships between imported models. It's used for error reporting and debugging to help identify where specific model elements came from.

Since:
4.0.0
See Also:
  • Constructor Details

  • Method Details

    • getLocation

      public String getLocation()
      Get the path/URL of the POM or null if unknown.
      Returns:
      the ___location
    • getModelId

      public String getModelId()
      Get the identifier of the POM in the format <groupId>:<artifactId>:<version>.
      Returns:
      the model id
    • 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
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • merge

      public static InputSource merge(InputSource src1, InputSource src2)