Interface RegistryKey
- All Known Implementing Classes:
IdentifiedRegistryKey,NamespacedRegistryKey,TypeRegistryKey
public interface RegistryKey
The
RegistryKey interface represents a key that can be used within a Registry to identify
and access registered values.
The RegistryKey is a marker interface for different types of keys that can be used in a registry.
Implementations of this interface define unique ways to identify entries in a registry. The key could be
either identified by a unique identifier or by a namespace and key combination.
This interface provides static factory methods to easily create two types of registry keys:
- Identified keys with a unique identifier (e.g., "someKey")
- Namespaced keys that have both a namespace and a key (e.g., "namespace:key")
- See Also:
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic IdentifiedRegistryKeyidentified(@NotNull String identifier) Creates anIdentifiedRegistryKeyusing the given unique identifier.static NamespacedRegistryKeynamespaced(@NotNull String namespacedKey) Creates aNamespacedRegistryKeyusing a namespaced key in the format "namespace:key".static NamespacedRegistryKeynamespaced(@NotNull String namespace, @NotNull String key) Creates aNamespacedRegistryKeyusing the given namespace and key.
-
Method Details
-
identified
Creates anIdentifiedRegistryKeyusing the given unique identifier.- Parameters:
identifier- the unique identifier for the registry key- Returns:
- a new instance of
IdentifiedRegistryKey
-
namespaced
static NamespacedRegistryKey namespaced(@NotNull @NotNull String namespace, @NotNull @NotNull String key) Creates aNamespacedRegistryKeyusing the given namespace and key.- Parameters:
namespace- the namespace that the key belongs tokey- the unique key within the namespace- Returns:
- a new instance of
NamespacedRegistryKey
-
namespaced
Creates aNamespacedRegistryKeyusing a namespaced key in the format "namespace:key".- Parameters:
namespacedKey- the namespaced key in the format "namespace:key"- Returns:
- a new instance of
NamespacedRegistryKey
-