Class CachingArtifactTypeRegistry
- java.lang.Object
-
- org.eclipse.aether.internal.impl.collect.CachingArtifactTypeRegistry
-
- All Implemented Interfaces:
ArtifactTypeRegistry
class CachingArtifactTypeRegistry extends java.lang.Object implements ArtifactTypeRegistry
A short-lived artifact type registry that caches results from a presumedly slower type registry.
-
-
Field Summary
Fields Modifier and Type Field Description private ArtifactTypeRegistry
delegate
private java.util.Map<java.lang.String,ArtifactType>
types
-
Constructor Summary
Constructors Modifier Constructor Description private
CachingArtifactTypeRegistry(ArtifactTypeRegistry delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ArtifactType
get(java.lang.String typeId)
Gets the artifact type with the specified identifier.static ArtifactTypeRegistry
newInstance(ArtifactTypeRegistry delegate)
static ArtifactTypeRegistry
newInstance(RepositorySystemSession session)
-
-
-
Field Detail
-
delegate
private final ArtifactTypeRegistry delegate
-
types
private final java.util.Map<java.lang.String,ArtifactType> types
-
-
Constructor Detail
-
CachingArtifactTypeRegistry
private CachingArtifactTypeRegistry(ArtifactTypeRegistry delegate)
-
-
Method Detail
-
newInstance
public static ArtifactTypeRegistry newInstance(RepositorySystemSession session)
-
newInstance
public static ArtifactTypeRegistry newInstance(ArtifactTypeRegistry delegate)
-
get
public ArtifactType get(java.lang.String typeId)
Description copied from interface:ArtifactTypeRegistry
Gets the artifact type with the specified identifier.- Specified by:
get
in interfaceArtifactTypeRegistry
- Parameters:
typeId
- The identifier of the type, must not benull
.- Returns:
- The artifact type or
null
if no type with the requested identifier exists.
-
-