Class EndpointBddTrait

java.lang.Object
software.amazon.smithy.model.traits.AbstractTrait
software.amazon.smithy.rulesengine.traits.EndpointBddTrait
All Implemented Interfaces:
FromSourceLocation, ToNode, ToShapeId, Trait, ToSmithyBuilder<EndpointBddTrait>

public final class EndpointBddTrait extends AbstractTrait implements ToSmithyBuilder<EndpointBddTrait>
Trait containing a precompiled BDD with full context for endpoint resolution.
  • Field Details

    • ID

      public static final ShapeId ID
  • Method Details

    • from

      public static EndpointBddTrait from(Cfg cfg)
      Creates a BddTrait from a control flow graph.
      Parameters:
      cfg - the control flow graph to compile
      Returns:
      the BddTrait containing the compiled BDD and all context
    • getParameters

      public Parameters getParameters()
      Gets the parameters for the endpoint rules.
      Returns:
      the parameters
    • getConditions

      public List<Condition> getConditions()
      Gets the ordered list of conditions.
      Returns:
      the conditions in evaluation order
    • getResults

      public List<Rule> getResults()
      Gets the ordered list of results.
      Returns:
      the results (index 0 is always NoMatchRule)
    • getBdd

      public Bdd getBdd()
      Gets the BDD structure.
      Returns:
      the BDD
    • getVersion

      public RulesVersion getVersion()
      Get the endpoint ruleset version.
      Returns:
      the rules engine version
    • transform

      Transform this BDD using the given function and return the updated BddTrait.
      Parameters:
      transformer - Transformer used to modify the trait.
      Returns:
      the updated trait.
    • createNode

      protected Node createNode()
      Description copied from class: AbstractTrait
      The result of toNode is used for hashCodes and equality. Subclasses must implement createNode to turn the trait into a Node. This is then cached for subsequent retrievals.
      Specified by:
      createNode in class AbstractTrait
      Returns:
      Returns the trait as a node.
    • fromNode

      public static EndpointBddTrait fromNode(Node node)
      Creates a BddTrait from a Node representation.
      Parameters:
      node - the node to parse
      Returns:
      the BddTrait
    • builder

      public static EndpointBddTrait.Builder builder()
      Creates a new builder for BddTrait.
      Returns:
      a new builder
    • toBuilder

      public EndpointBddTrait.Builder toBuilder()
      Description copied from interface: ToSmithyBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToSmithyBuilder<EndpointBddTrait>
      Returns:
      a builder for type T