java.lang.Object
software.amazon.smithy.rulesengine.language.syntax.rule.Rule
software.amazon.smithy.rulesengine.language.syntax.rule.ErrorRule
All Implemented Interfaces:
FromSourceLocation, ToNode, TypeCheck

public final class ErrorRule extends Rule
A rule-set rule that is used to indicate an error in evaluation.
  • Constructor Details

  • Method Details

    • getError

      public Expression getError()
      Gets the error expression to return when reaching this rule.
      Returns:
      the error expression.
    • 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