Class TreeRule
- java.lang.Object
-
- software.amazon.smithy.rulesengine.language.syntax.rule.Rule
-
- software.amazon.smithy.rulesengine.language.syntax.rule.TreeRule
-
- All Implemented Interfaces:
FromSourceLocation
,ToNode
,TypeCheck
public final class TreeRule extends Rule
A rule-set rule that is used to contain condition based branching rules.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class software.amazon.smithy.rulesengine.language.syntax.rule.Rule
Rule.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
accept(RuleValueVisitor<T> visitor)
Invoke theRuleValueVisitor
functions for this Rule.java.util.List<Rule>
getRules()
Gets the rules contained within this tree.java.lang.String
toString()
protected Type
typecheckValue(Scope<Type> scope)
-
Methods inherited from class software.amazon.smithy.rulesengine.language.syntax.rule.Rule
builder, builder, equals, fromNode, getConditions, getDocumentation, getSourceLocation, hashCode, toNode, typeCheck
-
-
-
-
Method Detail
-
getRules
public java.util.List<Rule> getRules()
Gets the rules contained within this tree.- Returns:
- the rules within this tree.
-
accept
public <T> T accept(RuleValueVisitor<T> visitor)
Description copied from class:Rule
Invoke theRuleValueVisitor
functions for this Rule.
-
typecheckValue
protected Type typecheckValue(Scope<Type> scope)
- Specified by:
typecheckValue
in classRule
-
-