Package org.mule.runtime.ast.graph.api
Interface ArtifactAstDependencyGraph
- All Known Implementing Classes:
DefaultArtifactAstDependencyGraph
public interface ArtifactAstDependencyGraph
Provides a means to start only a subset of the components of the artifact, relying on a dependency graph generated for its
components.
Implementations need not be thread safe.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionProvides aComparatorimplementation that when used to sort dependencies.Provides information about components referenced from within the artifact but not declared there.getRequiredComponents(String componentName) Provides a set of components that contains the required components for the componentName (ComponentAst.getComponentId()) provided.minimalArtifactFor(Predicate<ComponentAst> vertexPredicate) Creates anArtifactAstthat only contains the minimally required components for those which the providedvertexPredicateapplies to work properly.minimalArtifactFor(ComponentAst vertex) Creates anArtifactAstthat only contains the minimally required components for the providedvertexto work properly.
-
Method Details
-
minimalArtifactFor
Creates anArtifactAstthat only contains the minimally required components for the providedvertexto work properly.- Parameters:
vertex- the component to calculate the minimal artifact for- Returns:
- the minimal artifact
-
minimalArtifactFor
Creates anArtifactAstthat only contains the minimally required components for those which the providedvertexPredicateapplies to work properly.- Parameters:
vertexPredicate- the predicate of the components to calculate the minimal artifact for- Returns:
- the minimal artifact
-
getRequiredComponents
Provides a set of components that contains the required components for the componentName (ComponentAst.getComponentId()) provided.- Parameters:
componentName-ComponentAst.getComponentId(), a potential component name to calculate the direct dependencies for- Returns:
- a set of components that the component is dependent on
- Since:
- 1.1.0
-
getMissingDependencies
Set<ComponentAstDependency> getMissingDependencies()Provides information about components referenced from within the artifact but not declared there.- Returns:
- the information about the missing dependencies
-
dependencyComparator
Comparator<ComponentAst> dependencyComparator()Provides aComparatorimplementation that when used to sort dependencies.Given 2 components, A and B where A depends on B,
compare(A, B)will return a negative value andcompare(B, A)will return a positive value.Note: this comparator imposes orderings that are inconsistent with equals. For 2 components that do not depend on each other, the returned value will be 0, but that doesn't mean that the components are equal.
-