public abstract class GlobalPathRegistryImplementation extends Object
GlobalPathRegistry
.
Allows different implementations of the GlobalPathRegistry
.
The first SPI instance registered in the global Lookup
is used
by the GlobalPathRegistry
.
Threading: The implementations don't need to be thread safe,
synchronization is done by the GlobalPathRegistry
.Constructor and Description |
---|
GlobalPathRegistryImplementation() |
Modifier and Type | Method and Description |
---|---|
protected abstract Set<ClassPath> |
clear()
Removes all known classpaths.
|
protected abstract Set<ClassPath> |
getPaths(String id)
Find all paths of a certain type.
|
protected abstract Set<ClassPath> |
register(String id,
ClassPath[] paths)
Register some classpaths of a certain type.
|
protected abstract Set<ClassPath> |
unregister(String id,
ClassPath[] paths)
Unregister some classpaths of a certain type.
|
@NonNull protected abstract Set<ClassPath> getPaths(@NonNull String id)
id
- a classpath type, e.g. ClassPath.SOURCE
ClassPath
s of that type (may be empty but not null)@NonNull protected abstract Set<ClassPath> register(@NonNull String id, @NonNull ClassPath[] paths)
id
- a classpath type, e.g. ClassPath.SOURCE
paths
- a list of classpaths to add to the registry@NonNull protected abstract Set<ClassPath> unregister(@NonNull String id, @NonNull ClassPath[] paths) throws IllegalArgumentException
id
- a classpath type, e.g. ClassPath.SOURCE
paths
- a list of classpaths to remove from the registryIllegalArgumentException
- if they had not been registered before