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.
  • Method Details

    • getRules

      public 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 the RuleValueVisitor functions for this Rule.
      Specified by:
      accept in class Rule
      Type Parameters:
      T - the visitor return type.
      Parameters:
      visitor - the visitor to be invoked.
      Returns:
      the return value of the visitor.
    • typecheckValue

      protected Type typecheckValue(Scope<Type> scope)
      Specified by:
      typecheckValue in class Rule
    • toString

      public String toString()
      Overrides:
      toString in class Rule