Class PluginDependencyResolver.CircularDependencyException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.ultikits.ultitools.manager.PluginDependencyResolver.CircularDependencyException
All Implemented Interfaces:
Serializable
Enclosing class:
PluginDependencyResolver

public static class PluginDependencyResolver.CircularDependencyException extends Exception
Exception thrown when circular dependencies are detected.

Carries a structured partition alongside the message (D-10): getSortedPrefix() is every module Kahn's sort could still place, getRefusedPlugins() is the cycle plus everything transitively depending on it, and getCyclePaths() names each detected cycle as an edge path (first and last element equal), e.g. A -> B -> C -> A. The caller obtains all three from these accessors, never by parsing Throwable.getMessage().

See Also:
  • Field Details

  • Constructor Details

    • CircularDependencyException

      public CircularDependencyException(String message)
    • CircularDependencyException

      public CircularDependencyException(String message, List<Class<? extends UltiToolsPlugin>> sortedPrefix, Set<String> refusedPlugins, List<List<String>> cyclePaths)
      Constructs a circular-dependency refusal carrying the structured partition.
      Parameters:
      message - the human-readable detection message
      sortedPrefix - every plugin class Kahn's sort could still place, in load order
      refusedPlugins - the cycle members plus every plugin transitively depending on them, by plugin name
      cyclePaths - each detected cycle as an ordered list of plugin names whose first and last entries are the same node
      Since:
      6.3.0
  • Method Details

    • getSortedPrefix

      public List<Class<? extends UltiToolsPlugin>> getSortedPrefix()
      The plugin classes Kahn's sort could still place, in load order. Never null.
      Returns:
      the sortable prefix
      Since:
      6.3.0
    • getRefusedPlugins

      public Set<String> getRefusedPlugins()
      The cycle members plus every plugin transitively depending on them, by plugin name. Never null.
      Returns:
      the refused plugin names
      Since:
      6.3.0
    • getCyclePaths

      public List<List<String>> getCyclePaths()
      Each detected cycle as an ordered list of plugin names whose first and last entries are the same node, e.g. [A, B, C, A]. Never null; one entry per distinct cycle.
      Returns:
      the detected cycle paths
      Since:
      6.3.0