Class DefaultModelResolver.ResolverModelSource

java.lang.Object
org.apache.maven.internal.impl.resolver.DefaultModelResolver.ResolverModelSource
All Implemented Interfaces:
ModelSource, Source
Enclosing class:
DefaultModelResolver

protected static class DefaultModelResolver.ResolverModelSource extends Object implements ModelSource
  • Method Details

    • resolve

      public ModelSource resolve(ModelSource.ModelLocator modelLocator, String relative)
      Specified by:
      resolve in interface ModelSource
    • getPath

      public Path getPath()
      Description copied from interface: Source
      Provides access the file to be parsed, if this source is backed by a file.
      Specified by:
      getPath in interface Source
      Returns:
      the underlying Path, or null if this source is not backed by a file
    • openStream

      public InputStream openStream() throws IOException
      Description copied from interface: Source
      Creates a new byte stream to the source contents. Closing the returned stream is the responsibility of the caller.
      Specified by:
      openStream in interface Source
      Returns:
      a byte stream to the source contents, never null
      Throws:
      IOException - in case of IO issue
    • getLocation

      public String getLocation()
      Description copied from interface: Source
      Provides a user-friendly hint about the location of the source. This could be a local file path, a URI or just an empty string. The intention is to assist users during error reporting.
      Specified by:
      getLocation in interface Source
      Returns:
      a user-friendly hint about the location of the source, never null
    • resolve

      public Source resolve(String relative)
      Description copied from interface: Source
      Returns a new source identified by a relative path. Implementation MUST be able to accept relative parameter values that
      • use either / or \ file path separator,
      • have .. parent directory references,
      • point either at file or directory.
      Specified by:
      resolve in interface Source
      Parameters:
      relative - is the path of the requested source relative to this source
      Returns:
      related source or null if no such source
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object