public class DefaultArtifactAstDependencyGraph extends Object implements ArtifactAstDependencyGraph
| Constructor and Description |
|---|
DefaultArtifactAstDependencyGraph(ArtifactAst source,
org.jgrapht.Graph<ComponentAst,ComponentAstEdge> graph,
Set<ComponentAstDependency> missingDependencies) |
| Modifier and Type | Method and Description |
|---|---|
Comparator<ComponentAst> |
dependencyComparator()
Provides a
Comparator implementation that when used to sort dependencies. |
Set<ComponentAstDependency> |
getMissingDependencies()
Provides information about components referenced from within the artifact but not declared there.
|
Set<ComponentAst> |
getRequiredComponents(String componentName)
Provides a set of components that contains the required components for the componentName
(
ComponentAst.getComponentId()) provided. |
ArtifactAst |
minimalArtifactFor(ComponentAst vertex)
Creates an
ArtifactAst that only contains the minimally required components for the provided vertex to work
properly. |
ArtifactAst |
minimalArtifactFor(Predicate<ComponentAst> vertexPredicate)
Creates an
ArtifactAst that only contains the minimally required components for those which the provided
vertexPredicate applies to work properly. |
public DefaultArtifactAstDependencyGraph(ArtifactAst source, org.jgrapht.Graph<ComponentAst,ComponentAstEdge> graph, Set<ComponentAstDependency> missingDependencies)
public ArtifactAst minimalArtifactFor(ComponentAst vertex)
ArtifactAstDependencyGraphArtifactAst that only contains the minimally required components for the provided vertex to work
properly.minimalArtifactFor in interface ArtifactAstDependencyGraphvertex - the component to calculate the minimal artifact forpublic ArtifactAst minimalArtifactFor(Predicate<ComponentAst> vertexPredicate)
ArtifactAstDependencyGraphArtifactAst that only contains the minimally required components for those which the provided
vertexPredicate applies to work properly.minimalArtifactFor in interface ArtifactAstDependencyGraphvertexPredicate - the predicate of the components to calculate the minimal artifact forpublic Set<ComponentAst> getRequiredComponents(String componentName)
ArtifactAstDependencyGraphComponentAst.getComponentId()) provided.getRequiredComponents in interface ArtifactAstDependencyGraphcomponentName - ComponentAst.getComponentId(), a potential component name to calculate the direct dependencies
forpublic Set<ComponentAstDependency> getMissingDependencies()
ArtifactAstDependencyGraphgetMissingDependencies in interface ArtifactAstDependencyGraphpublic Comparator<ComponentAst> dependencyComparator()
ArtifactAstDependencyGraphComparator implementation 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 and
compare(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.
dependencyComparator in interface ArtifactAstDependencyGraphCopyright © 2022 MuleSoft, Inc.. All rights reserved.