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()
    • 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

      @Deprecated(since="6.3.0", forRemoval=true) public Set<String> getAllDependencies(Set<String> availablePlugins)
      Deprecated, for removal: This API element is subject to removal in a future version.
      use getAllDependencies(Set, Map), which resolves each entry through the plugin.yml-name alias map (D-12) before checking availability
      Gets all dependencies (hard + soft) that exist in the available plugins.
      Scheduled removal version:
      6.4.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
      aliasMap - maps a declared name (simple class name or plugin.yml name) to the canonical node name (always a simple class name)
      Returns:
      the combined hard + resolvable-soft dependency set, by raw declared name
      Since:
      6.3.0