Class MavenChainedWorkspaceReader

java.lang.Object
org.apache.maven.internal.aether.MavenChainedWorkspaceReader
All Implemented Interfaces:
MavenWorkspaceReader, org.eclipse.aether.repository.WorkspaceReader

public final class MavenChainedWorkspaceReader extends Object implements MavenWorkspaceReader
A maven workspace reader that delegates to a chain of other readers, effectively aggregating their contents.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private org.eclipse.aether.util.repository.ChainedWorkspaceReader
     
    private org.eclipse.aether.repository.WorkspaceReader[]
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    MavenChainedWorkspaceReader(org.eclipse.aether.repository.WorkspaceReader... readers)
    Creates a new workspace reader by chaining the specified readers.
  • Method Summary

    Modifier and Type
    Method
    Description
    findArtifact(org.eclipse.aether.artifact.Artifact artifact)
     
    findModel(org.eclipse.aether.artifact.Artifact artifact)
     
    findVersions(org.eclipse.aether.artifact.Artifact artifact)
     
    org.eclipse.aether.repository.WorkspaceRepository
     
    static org.eclipse.aether.repository.WorkspaceReader
    of(Collection<org.eclipse.aether.repository.WorkspaceReader> workspaceReaderCollection)
    chains a collection of WorkspaceReaders

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • delegate

      private org.eclipse.aether.util.repository.ChainedWorkspaceReader delegate
    • readers

      private org.eclipse.aether.repository.WorkspaceReader[] readers
  • Constructor Details

    • MavenChainedWorkspaceReader

      private MavenChainedWorkspaceReader(org.eclipse.aether.repository.WorkspaceReader... readers)
      Creates a new workspace reader by chaining the specified readers.
      Parameters:
      readers - The readers to chain must not be null.
  • Method Details

    • findModel

      public Model findModel(org.eclipse.aether.artifact.Artifact artifact)
      Specified by:
      findModel in interface MavenWorkspaceReader
    • getRepository

      public org.eclipse.aether.repository.WorkspaceRepository getRepository()
      Specified by:
      getRepository in interface org.eclipse.aether.repository.WorkspaceReader
    • findArtifact

      public File findArtifact(org.eclipse.aether.artifact.Artifact artifact)
      Specified by:
      findArtifact in interface org.eclipse.aether.repository.WorkspaceReader
    • findVersions

      public List<String> findVersions(org.eclipse.aether.artifact.Artifact artifact)
      Specified by:
      findVersions in interface org.eclipse.aether.repository.WorkspaceReader
    • of

      public static org.eclipse.aether.repository.WorkspaceReader of(Collection<org.eclipse.aether.repository.WorkspaceReader> workspaceReaderCollection)
      chains a collection of WorkspaceReaders
      Parameters:
      workspaceReaderCollection - the collection of readers, might be empty but never null
      Returns:
      if the collection contains only one item returns the single item, otherwise creates a new MavenChainedWorkspaceReader chaining all readers in the order of the given collection.