Class PluginDependencyResolver.MissingDependencyException
- All Implemented Interfaces:
Serializable
- Enclosing class:
PluginDependencyResolver
Carries a structured partition alongside the message (D-10): getRefusedPlugins() is
the declaring module(s) plus everything that transitively depends on them (#676:
softDepends, loadBefore and plugin.yml loadAfter never
carry this refusal), plus - when an independent cycle occurs in the same resolve - every
remaining module the sort cannot place, refused by the same rule as
PluginDependencyResolver.CircularDependencyException. getSortedPrefix() is every other module, in
load order; the two are disjoint and together cover every input module.
getCyclePaths() names each such cycle and is empty when there is none. The caller
obtains all three from these accessors, never by parsing Throwable.getMessage().
A missing dependency takes precedence: when both occur, this exception is thrown, not
PluginDependencyResolver.CircularDependencyException.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMissingDependencyException(String message) MissingDependencyException(String message, List<Class<? extends UltiToolsPlugin>> sortedPrefix, Set<String> refusedPlugins) Constructs a missing-hard-dependency refusal carrying the structured partition and no cycle paths.MissingDependencyException(String message, List<Class<? extends UltiToolsPlugin>> sortedPrefix, Set<String> refusedPlugins, List<List<String>> cyclePaths) Constructs a missing-hard-dependency refusal that also carries the paths of independent cycles found among the modules the missing dependency did not refuse. -
Method Summary
Modifier and TypeMethodDescriptionEach independent cycle found in the same resolve, as an ordered list of plugin names whose first and last entries are the same node, e.g.The declaring module(s), every plugin that transitivelydependson them, and every module an independent cycle blocks, by plugin name.List<Class<? extends UltiToolsPlugin>> The plugin classes that survive, in load order: every module neither in thedependsclosure of a module with a missing hard dependency nor blocked by a cycle.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
-
MissingDependencyException
-
MissingDependencyException
public MissingDependencyException(String message, List<Class<? extends UltiToolsPlugin>> sortedPrefix, Set<String> refusedPlugins) Constructs a missing-hard-dependency refusal carrying the structured partition and no cycle paths.- Parameters:
message- the human-readable detection message, naming the declaring module(s) and the dependency each wantedsortedPrefix- every plugin class that survives, in load orderrefusedPlugins- every refused plugin, by plugin name- Since:
- 6.3.0
-
MissingDependencyException
public MissingDependencyException(String message, List<Class<? extends UltiToolsPlugin>> sortedPrefix, Set<String> refusedPlugins, List<List<String>> cyclePaths) Constructs a missing-hard-dependency refusal that also carries the paths of independent cycles found among the modules the missing dependency did not refuse.- Parameters:
message- the human-readable detection message, naming the declaring module(s), the dependency each wanted and, when cycles exist, the modules they blocksortedPrefix- every plugin class that survives, in load orderrefusedPlugins- every refused plugin, by plugin name: the depends closure of the declaring modules plus every module the sort could not placecyclePaths- each detected cycle as an ordered list of plugin names whose first and last entries are the same node; empty when there is none- Since:
- 6.3.0
-
-
Method Details
-
getSortedPrefix
The plugin classes that survive, in load order: every module neither in thedependsclosure of a module with a missing hard dependency nor blocked by a cycle. Never null.- Returns:
- the sortable prefix
- Since:
- 6.3.0
-
getRefusedPlugins
The declaring module(s), every plugin that transitivelydependson them, and every module an independent cycle blocks, by plugin name. Never null.- Returns:
- the refused plugin names
- Since:
- 6.3.0
-
getCyclePaths
Each independent cycle found in the same resolve, as an ordered list of plugin names whose first and last entries are the same node, e.g.[A, B, A]. Never null; empty when the only failure is a missing dependency.- Returns:
- the detected cycle paths
- Since:
- 6.3.0
-