Class DependencyResolver
java.lang.Object
org.pf4j.DependencyResolver
This class builds a dependency graph for a list of plugins (descriptors).
The entry point is the
resolve(List) method, method that returns a DependencyResolver.Result object.
The Result class contains nice information about the result of resolve operation (if it's a cyclic dependency,
they are not found dependencies, they are dependencies with wrong version).
This class is very useful for if-else scenarios.
Only some attributes (pluginId, dependencies and pluginVersion) from PluginDescriptor are used in
the process of resolve operation.- Author:
- Decebal Suiu
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classIt will be thrown if a cyclic dependency is detected.static classIndicates that the dependencies required were not found.static classIndicates that some dependencies have wrong version.static classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckDependencyVersion(String requiredVersion, String existingVersion) Check if an existing version of dependency is compatible with the required version (from plugin descriptor).getDependencies(String pluginId) Retrieves the plugins ids that the given plugin id directly depends on.getDependents(String pluginId) Retrieves the plugins ids that the given content is a direct dependency of.resolve(List<PluginDescriptor> plugins)
-
Constructor Details
-
DependencyResolver
-
-
Method Details
-
resolve
-
getDependencies
-
getDependents
-
checkDependencyVersion
-