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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for BddTrait.static final class -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic EndpointBddTrait.Builderbuilder()Creates a new builder for BddTrait.protected NodeThe result of toNode is used for hashCodes and equality.static EndpointBddTraitCreates a BddTrait from a control flow graph.static EndpointBddTraitCreates a BddTrait from a Node representation.getBdd()Gets the BDD structure.Gets the ordered list of conditions.Gets the parameters for the endpoint rules.Gets the ordered list of results.Get the endpoint ruleset version.Take this object and create a builder that contains all of the current property values of this object.transform(Function<EndpointBddTrait, EndpointBddTrait> transformer) Transform this BDD using the given function and return the updated BddTrait.Methods inherited from class software.amazon.smithy.model.traits.AbstractTrait
equals, getSourceLocation, hashCode, setNodeCache, toNode, toShapeId, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.smithy.model.traits.Trait
isSynthetic
-
Field Details
-
ID
-
-
Method Details
-
from
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
Gets the parameters for the endpoint rules.- Returns:
- the parameters
-
getConditions
Gets the ordered list of conditions.- Returns:
- the conditions in evaluation order
-
getResults
Gets the ordered list of results.- Returns:
- the results (index 0 is always NoMatchRule)
-
getBdd
Gets the BDD structure.- Returns:
- the BDD
-
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
Description copied from class:AbstractTraitThe 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:
createNodein classAbstractTrait- Returns:
- Returns the trait as a node.
-
fromNode
Creates a BddTrait from a Node representation.- Parameters:
node- the node to parse- Returns:
- the BddTrait
-
builder
Creates a new builder for BddTrait.- Returns:
- a new builder
-
toBuilder
Description copied from interface:ToSmithyBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToSmithyBuilder<EndpointBddTrait>- Returns:
- a builder for type T
-