Package org.eclipse.aether.util.artifact
Class SimpleArtifactTypeRegistry
- java.lang.Object
-
- org.eclipse.aether.util.artifact.SimpleArtifactTypeRegistry
-
- All Implemented Interfaces:
ArtifactTypeRegistry
- Direct Known Subclasses:
DefaultArtifactTypeRegistry,OverlayArtifactTypeRegistry
class SimpleArtifactTypeRegistry extends java.lang.Object implements ArtifactTypeRegistry
A simple map-based artifact type registry.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,ArtifactType>types
-
Constructor Summary
Constructors Constructor Description SimpleArtifactTypeRegistry()Creates a new artifact type registry with initally no registered artifact types.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleArtifactTypeRegistryadd(ArtifactType type)Adds the specified artifact type to the registry.ArtifactTypeget(java.lang.String typeId)Gets the artifact type with the specified identifier.java.lang.StringtoString()
-
-
-
Field Detail
-
types
private final java.util.Map<java.lang.String,ArtifactType> types
-
-
Constructor Detail
-
SimpleArtifactTypeRegistry
SimpleArtifactTypeRegistry()
Creates a new artifact type registry with initally no registered artifact types. Useadd(ArtifactType)to populate the registry.
-
-
Method Detail
-
add
public SimpleArtifactTypeRegistry add(ArtifactType type)
Adds the specified artifact type to the registry.- 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- Parameters:
typeId- The identifier of the type, must not benull.- Returns:
- The artifact type or
nullif no type with the requested identifier exists.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-