Class TopologicalShapeSort

java.lang.Object
software.amazon.smithy.model.loader.TopologicalShapeSort

@Deprecated public final class TopologicalShapeSort extends Object
Deprecated.
Topologically sorts shapes based on their dependencies (i.e., mixins).

Deprecated in favor of DependencyGraph, which is more generic and less stateful.

  • Constructor Details

    • TopologicalShapeSort

      public TopologicalShapeSort()
      Deprecated.
  • Method Details

    • enqueue

      public void enqueue(Shape shape)
      Deprecated.
      Add a shape to the sort queue, and automatically extract dependencies.
      Parameters:
      shape - Shape to add.
    • enqueue

      public void enqueue(ShapeId shape, Collection<ShapeId> dependencies)
      Deprecated.
      Add a shape to the sort queue, and provide an explicit dependencies list.
      Parameters:
      shape - Shape to add.
      dependencies - Dependencies of the shape.
    • dequeueSortedShapes

      public List<ShapeId> dequeueSortedShapes()
      Deprecated.
      Sort the shapes and returns the ordered list of shape IDs.
      Returns:
      Returns the topologically sorted list of shape IDs.
      Throws:
      TopologicalShapeSort.CycleException - if cycles exist between shapes.