Package com.ultikits.ultitools.manager
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
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 every module it
could not place - the cycle members plus every module ordered after them over any edge kind
(depends, present softDepends, loadBefore, plugin.yml
loadAfter) - 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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCircularDependencyException(String message) CircularDependencyException(String message, List<Class<? extends UltiToolsPlugin>> sortedPrefix, Set<String> refusedPlugins, List<List<String>> cyclePaths) Constructs a circular-dependency refusal carrying the structured partition. -
Method Summary
Modifier and TypeMethodDescriptionEach detected cycle as an ordered list of plugin names whose first and last entries are the same node, e.g.Every plugin the sort could not place - the cycle members plus every plugin ordered after them over any edge kind - by plugin name.List<Class<? extends UltiToolsPlugin>> The plugin classes Kahn's sort could still place, in load order.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
sortedPrefix
-
refusedPlugins
-
cyclePaths
-
-
Constructor Details
-
CircularDependencyException
-
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 messagesortedPrefix- every plugin class Kahn's sort could still place, in load orderrefusedPlugins- every plugin the sort could not place - the cycle members plus every plugin ordered after them - by plugin namecyclePaths- 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
The plugin classes Kahn's sort could still place, in load order. Never null.- Returns:
- the sortable prefix
- Since:
- 6.3.0
-
getRefusedPlugins
Every plugin the sort could not place - the cycle members plus every plugin ordered after them over any edge kind - by plugin name. Never null.- Returns:
- the refused plugin names
- Since:
- 6.3.0
-
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
-