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 Details

    • minimalArtifactFor

      ArtifactAst minimalArtifactFor(ComponentAst vertex)
      Creates an ArtifactAst that only contains the minimally required components for the provided vertex to work properly.
      Parameters:
      vertex - the component to calculate the minimal artifact for
      Returns:
      the minimal artifact
    • minimalArtifactFor

      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.
      Parameters:
      vertexPredicate - the predicate of the components to calculate the minimal artifact for
      Returns:
      the minimal artifact
    • getRequiredComponents

      Set<ComponentAst> getRequiredComponents(String componentName)
      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 a Comparator 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.