Package org.eclipse.aether.util.artifact
Class OverlayArtifactTypeRegistry
- java.lang.Object
-
- org.eclipse.aether.util.artifact.SimpleArtifactTypeRegistry
-
- org.eclipse.aether.util.artifact.OverlayArtifactTypeRegistry
-
- All Implemented Interfaces:
ArtifactTypeRegistry
public final class OverlayArtifactTypeRegistry extends SimpleArtifactTypeRegistry
An artifact type registry which first consults its own mappings and in case of an unknown type falls back to another type registry.
-
-
Field Summary
Fields Modifier and Type Field Description private ArtifactTypeRegistrydelegate
-
Constructor Summary
Constructors Constructor Description OverlayArtifactTypeRegistry(ArtifactTypeRegistry delegate)Creates a new artifact type registry with initially no registered artifact types and the specified fallback registry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OverlayArtifactTypeRegistryadd(ArtifactType type)Adds the specified artifact type to the registry.ArtifactTypeget(java.lang.String typeId)Gets the artifact type with the specified identifier.-
Methods inherited from class org.eclipse.aether.util.artifact.SimpleArtifactTypeRegistry
toString
-
-
-
-
Field Detail
-
delegate
private final ArtifactTypeRegistry delegate
-
-
Constructor Detail
-
OverlayArtifactTypeRegistry
public OverlayArtifactTypeRegistry(ArtifactTypeRegistry delegate)
Creates a new artifact type registry with initially no registered artifact types and the specified fallback registry. Useadd(ArtifactType)to populate the registry.- Parameters:
delegate- The artifact type registry to fall back to, may benull.
-
-
Method Detail
-
add
public OverlayArtifactTypeRegistry add(ArtifactType type)
Adds the specified artifact type to the registry.- Overrides:
addin classSimpleArtifactTypeRegistry- Parameters:
type- The artifact type to add, must not benull.- Returns:
- This registry for chaining, never
null.
-
get
public ArtifactType get(java.lang.String typeId)
Description copied from interface:ArtifactTypeRegistryGets the artifact type with the specified identifier.- Specified by:
getin interfaceArtifactTypeRegistry- Overrides:
getin classSimpleArtifactTypeRegistry- Parameters:
typeId- The identifier of the type, must not benull.- Returns:
- The artifact type or
nullif no type with the requested identifier exists.
-
-