Class ReferenceKey
java.lang.Object
tech.guilhermekaua.spigotboot.config.reference.key.ReferenceKey
- Direct Known Subclasses:
FolderConfigItemKey,SingleConfigKey
Identifies a config or folder config item in the reference dependency graph.
This is used as a key for tracking dependencies between configs during load ordering and reload propagation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull ReferenceKeyfolderConfigItem(@NotNull String folderConfigName, @NotNull String itemId) Creates a key for a folder config item.static @NotNull ReferenceKeyfromReference(@NotNull ConfigReference reference) Creates a key from a parsed config reference.abstract @NotNull StringGets a human-readable display name for this key.abstract booleanChecks if this key represents a folder config item.abstract booleanChecks if this key represents a single config.static @NotNull ReferenceKeysingleConfig(@NotNull String configName) Creates a key for a single config.
-
Constructor Details
-
ReferenceKey
public ReferenceKey()
-
-
Method Details
-
singleConfig
Creates a key for a single config.- Parameters:
configName- the config name- Returns:
- the reference key
-
folderConfigItem
@NotNull public static @NotNull ReferenceKey folderConfigItem(@NotNull @NotNull String folderConfigName, @NotNull @NotNull String itemId) Creates a key for a folder config item.- Parameters:
folderConfigName- the folder config nameitemId- the item ID- Returns:
- the reference key
-
fromReference
@NotNull public static @NotNull ReferenceKey fromReference(@NotNull @NotNull ConfigReference reference) Creates a key from a parsed config reference.- Parameters:
reference- the config reference- Returns:
- the reference key
-
isSingleConfig
public abstract boolean isSingleConfig()Checks if this key represents a single config.- Returns:
- true if single config key
-
isFolderConfigItem
public abstract boolean isFolderConfigItem()Checks if this key represents a folder config item.- Returns:
- true if folder config item key
-
getDisplayName
Gets a human-readable display name for this key.- Returns:
- the display name
-