Package org.apache.maven.internal.aether
Class MavenChainedWorkspaceReader
java.lang.Object
org.apache.maven.internal.aether.MavenChainedWorkspaceReader
- All Implemented Interfaces:
MavenWorkspaceReader
,org.eclipse.aether.repository.WorkspaceReader
A maven workspace reader that delegates to a chain of other readers, effectively aggregating their contents.
-
Field Summary
Modifier and TypeFieldDescriptionprotected List<org.eclipse.aether.repository.WorkspaceReader>
protected org.eclipse.aether.repository.WorkspaceRepository
-
Constructor Summary
ConstructorDescriptionMavenChainedWorkspaceReader
(org.eclipse.aether.repository.WorkspaceReader... readers) Creates a new workspace reader by chaining the specified readers. -
Method Summary
Modifier and TypeMethodDescriptionfindArtifact
(org.eclipse.aether.artifact.Artifact artifact) findModel
(org.eclipse.aether.artifact.Artifact artifact) findVersions
(org.eclipse.aether.artifact.Artifact artifact) List<org.eclipse.aether.repository.WorkspaceReader>
org.eclipse.aether.repository.WorkspaceRepository
static org.eclipse.aether.repository.WorkspaceReader
of
(Collection<org.eclipse.aether.repository.WorkspaceReader> workspaceReaderCollection) chains a collection ofWorkspaceReader
svoid
setReaders
(Collection<org.eclipse.aether.repository.WorkspaceReader> readers)
-
Field Details
-
readers
-
repository
protected org.eclipse.aether.repository.WorkspaceRepository repository
-
-
Constructor Details
-
MavenChainedWorkspaceReader
public 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 benull
.
-
-
Method Details
-
getRepository
public org.eclipse.aether.repository.WorkspaceRepository getRepository()- Specified by:
getRepository
in interfaceorg.eclipse.aether.repository.WorkspaceReader
-
findModel
- Specified by:
findModel
in interfaceMavenWorkspaceReader
-
findArtifact
- Specified by:
findArtifact
in interfaceorg.eclipse.aether.repository.WorkspaceReader
-
findVersions
- Specified by:
findVersions
in interfaceorg.eclipse.aether.repository.WorkspaceReader
-
setReaders
-
getReaders
-
of
public static org.eclipse.aether.repository.WorkspaceReader of(Collection<org.eclipse.aether.repository.WorkspaceReader> workspaceReaderCollection) chains a collection ofWorkspaceReader
s- Parameters:
workspaceReaderCollection
- the collection of readers, might be empty but nevernull
- 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.
-