Class DefaultArtifactAstDependencyGraph
java.lang.Object
org.mule.runtime.ast.graph.internal.DefaultArtifactAstDependencyGraph
- All Implemented Interfaces:
ArtifactAstDependencyGraph
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultArtifactAstDependencyGraph(ArtifactAst source, org.jgrapht.Graph<ComponentAst, ComponentAstEdge> graph, Set<ComponentAstDependency> missingDependencies) -
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.
-
Constructor Details
-
DefaultArtifactAstDependencyGraph
public DefaultArtifactAstDependencyGraph(ArtifactAst source, org.jgrapht.Graph<ComponentAst, ComponentAstEdge> graph, Set<ComponentAstDependency> missingDependencies)
-
-
Method Details
-
minimalArtifactFor
Description copied from interface:ArtifactAstDependencyGraphCreates anArtifactAstthat only contains the minimally required components for the providedvertexto work properly.- Specified by:
minimalArtifactForin interfaceArtifactAstDependencyGraph- Parameters:
vertex- the component to calculate the minimal artifact for- Returns:
- the minimal artifact
-
minimalArtifactFor
Description copied from interface:ArtifactAstDependencyGraphCreates anArtifactAstthat only contains the minimally required components for those which the providedvertexPredicateapplies to work properly.- Specified by:
minimalArtifactForin interfaceArtifactAstDependencyGraph- Parameters:
vertexPredicate- the predicate of the components to calculate the minimal artifact for- Returns:
- the minimal artifact
-
getRequiredComponents
Description copied from interface:ArtifactAstDependencyGraphProvides a set of components that contains the required components for the componentName (ComponentAst.getComponentId()) provided.- Specified by:
getRequiredComponentsin interfaceArtifactAstDependencyGraph- 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
-
getMissingDependencies
Description copied from interface:ArtifactAstDependencyGraphProvides information about components referenced from within the artifact but not declared there.- Specified by:
getMissingDependenciesin interfaceArtifactAstDependencyGraph- Returns:
- the information about the missing dependencies
-
dependencyComparator
Description copied from interface:ArtifactAstDependencyGraphProvides 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.
- Specified by:
dependencyComparatorin interfaceArtifactAstDependencyGraph
-