Class ErrorRule
- 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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class software.amazon.smithy.rulesengine.language.syntax.rule.Rule
Rule.Builder
-
-
Constructor Summary
Constructors Constructor Description ErrorRule(Rule.Builder builder, Expression error)
-
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.Expression
getError()
Gets the error expression to return when reaching this rule.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
-
-
-
-
Constructor Detail
-
ErrorRule
public ErrorRule(Rule.Builder builder, Expression error)
-
-
Method Detail
-
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 theRuleValueVisitor
functions for this Rule.
-
typecheckValue
protected Type typecheckValue(Scope<Type> scope)
- Specified by:
typecheckValue
in classRule
-
-