Class ChainedWorkspaceReader
- java.lang.Object
-
- org.eclipse.aether.util.repository.ChainedWorkspaceReader
-
- All Implemented Interfaces:
WorkspaceReader
public final class ChainedWorkspaceReader extends Object implements WorkspaceReader
A workspace reader that delegates to a chain of other readers, effectively aggregating their contents.
-
-
Constructor Summary
Constructors Constructor Description ChainedWorkspaceReader(WorkspaceReader... readers)
Creates a new workspace reader by chaining the specified readers.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description File
findArtifact(Artifact artifact)
List<String>
findVersions(Artifact artifact)
WorkspaceRepository
getRepository()
static WorkspaceReader
newInstance(WorkspaceReader reader1, WorkspaceReader reader2)
Creates a new workspace reader by chaining the specified readers.
-
-
-
Constructor Detail
-
ChainedWorkspaceReader
public ChainedWorkspaceReader(WorkspaceReader... readers)
Creates a new workspace reader by chaining the specified readers.- Parameters:
readers
- The readers to chain, may benull
.- See Also:
newInstance(WorkspaceReader, WorkspaceReader)
-
-
Method Detail
-
newInstance
public static WorkspaceReader newInstance(WorkspaceReader reader1, WorkspaceReader reader2)
Creates a new workspace reader by chaining the specified readers. In contrast to the constructor, this factory method will avoid creating an actual chained reader if one of the specified readers is actuallynull
.- Parameters:
reader1
- The first workspace reader, may benull
.reader2
- The second workspace reader, may benull
.- Returns:
- The chained reader or
null
if no workspace reader was supplied.
-
findArtifact
public File findArtifact(Artifact artifact)
- Specified by:
findArtifact
in interfaceWorkspaceReader
-
findVersions
public List<String> findVersions(Artifact artifact)
- Specified by:
findVersions
in interfaceWorkspaceReader
-
getRepository
public WorkspaceRepository getRepository()
- Specified by:
getRepository
in interfaceWorkspaceReader
-
-