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 ArtifactTypeRegistrydelegateprivate java.util.Map<java.lang.String,ArtifactType>types
-
Constructor Summary
Constructors Modifier Constructor Description privateCachingArtifactTypeRegistry(ArtifactTypeRegistry delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ArtifactTypeget(java.lang.String typeId)Gets the artifact type with the specified identifier.static ArtifactTypeRegistrynewInstance(ArtifactTypeRegistry delegate)static ArtifactTypeRegistrynewInstance(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: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.
-
-