public class DependencyGraph
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DependencyGraph.ComponentState
Use this to specify which components the dependency graph should contain
|
static class |
DependencyGraph.DependencyState
Use this to specify which dependencies the graph should contain
|
Modifier and Type | Method and Description |
---|---|
java.util.List<ComponentDeclaration> |
getAllComponents()
Returns the list of components in the graph
|
java.util.List<ComponentDependencyDeclaration> |
getAllDependencies()
Returns a list all dependencies in the graph
|
java.util.List<CircularDependency> |
getCircularDependencies()
Returns the list of circular dependencies in the graph
|
java.util.List<ComponentDependencyDeclaration> |
getDependecies(ComponentDeclaration componentDeclaration)
For a given component declaration, it returns a list of its dependencies in the state
specified when the graph was built.
|
static DependencyGraph |
getGraph(DependencyGraph.ComponentState componentState,
DependencyGraph.DependencyState dependencyState)
Build the dependency graph.
|
java.util.List<MissingDependency> |
getMissingCustomDependencies()
Returns all custom missing dependencies.
|
java.util.List<MissingDependency> |
getMissingDependencies(java.lang.String type)
Returns all the missing dependencies of a given type.
|
java.util.List<ComponentDeclaration> |
getProviders(ComponentDependencyDeclaration dependency)
Returns the list of components that provide the given dependency.
|
public static DependencyGraph getGraph(DependencyGraph.ComponentState componentState, DependencyGraph.DependencyState dependencyState)
This implementation currently only builds a graph of unregistered components and required unavailable dependencies.
componentState
- Include only the components in this statedependencyState
- Include only the dependencies in this statepublic java.util.List<ComponentDeclaration> getAllComponents()
public java.util.List<ComponentDependencyDeclaration> getAllDependencies()
public java.util.List<ComponentDependencyDeclaration> getDependecies(ComponentDeclaration componentDeclaration)
componentDeclaration
- public java.util.List<ComponentDeclaration> getProviders(ComponentDependencyDeclaration dependency)
dependency
- public java.util.List<CircularDependency> getCircularDependencies()
public java.util.List<MissingDependency> getMissingDependencies(java.lang.String type)
type
- The type of the dependencies to be returned. This can be either one of the types
known by the DependencyManager (service, bundle, configuration, resource),
a user defined type or null, in which case all missing dependencies must be returned.public java.util.List<MissingDependency> getMissingCustomDependencies()