Class PluginDependencyResolver.PluginNode

java.lang.Object
com.ultikits.ultitools.manager.PluginDependencyResolver.PluginNode
Enclosing class:
PluginDependencyResolver

public static class PluginDependencyResolver.PluginNode extends Object
Represents a dependency graph node containing plugin class and its dependencies.
  • Field Details

    • pluginClass

      private final Class<? extends UltiToolsPlugin> pluginClass
    • pluginName

      private final String pluginName
    • hardDependencies

      private final Set<String> hardDependencies
    • softDependencies

      private final Set<String> softDependencies
    • loadBefore

      private final Set<String> loadBefore
    • loadAfter

      private final Set<String> loadAfter
    • pluginYmlName

      private final String pluginYmlName
  • Constructor Details

  • Method Details

    • getPluginClass

      public Class<? extends UltiToolsPlugin> getPluginClass()
    • getPluginName

      public String getPluginName()
    • getId

      private String getId()
      Unique graph identity, not an additional dependency-name syntax.
    • getHardDependencies

      public Set<String> getHardDependencies()
    • getSoftDependencies

      public Set<String> getSoftDependencies()
    • getLoadBefore

      public Set<String> getLoadBefore()
    • getLoadAfter

      public Set<String> getLoadAfter()
      The plugins this one should load after, as declared in its own plugin.yml loadAfter: list. An entry naming a module that is not installed is inert (Paper parity) - only depends treats an absent target as an error.
      Returns:
      the declared loadAfter targets, by raw declared name (not yet alias-resolved)
      Since:
      6.3.0
    • getPluginYmlName

      public String getPluginYmlName()
      This module's plugin.yml name: value, or null if its code source has no readable plugin.yml. Used to build the alias map in PluginDependencyResolver.resolve(List) so a dependency entry can name a module by either its simple class name or its plugin.yml name.
      Returns:
      the declared plugin.yml name, or null
      Since:
      6.3.0
    • getAllDependencies

      public Set<String> getAllDependencies(Set<String> availablePlugins, Map<String,String> aliasMap)
      Gets all dependencies (hard + soft) that exist in the available plugins, resolving each soft-dependency entry through aliasMap before checking availability so it may name either a simple class name or a plugin.yml name (D-12).
      Parameters:
      availablePlugins - the plugin names present in this resolve, as the keys aliasMap maps to; the resolver passes its internal node keys (fully qualified class names)
      aliasMap - maps a declared name (simple class name or plugin.yml name) to the canonical node key (independent of its display name). An entry missing from it is looked up in availablePlugins verbatim, so with the resolver's own inputs a soft dependency spelled as a fully qualified class name counts as available but adds no ordering edge, because the resolver itself resolves only declared names (#841)
      Returns:
      the combined hard + resolvable-soft dependency set, by raw declared name
      Since:
      6.3.0