java.lang.Object
tech.guilhermekaua.spigotboot.config.reference.key.ReferenceKey
Direct Known Subclasses:
FolderConfigItemKey, SingleConfigKey

public abstract class ReferenceKey extends Object
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 Details

    • ReferenceKey

      public ReferenceKey()
  • Method Details

    • singleConfig

      @NotNull public static @NotNull ReferenceKey singleConfig(@NotNull @NotNull String configName)
      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 name
      itemId - 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

      @NotNull public abstract @NotNull String getDisplayName()
      Gets a human-readable display name for this key.
      Returns:
      the display name