Class DefaultVisitor<R>
java.lang.Object
software.amazon.smithy.rulesengine.language.visit.DefaultVisitor<R>
- Type Parameters:
R
- the return value type.
- All Implemented Interfaces:
ExpressionVisitor<R>
,RuleValueVisitor<R>
- Direct Known Subclasses:
TraversingVisitor
public abstract class DefaultVisitor<R>
extends Object
implements RuleValueVisitor<R>, ExpressionVisitor<R>
An abstract visitor implementation for a
RuleValueVisitor
, and ExpressionVisitor
.-
Nested Class Summary
Nested classes/interfaces inherited from interface software.amazon.smithy.rulesengine.language.visit.ExpressionVisitor
ExpressionVisitor.Default<R>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract R
visitBoolEquals
(Expression left, Expression right) visitEndpointRule
(Endpoint endpoint) Invoked when reaching an endpoint rule.visitErrorRule
(Expression error) Invoked when reaching an error rule.visitGetAttr
(GetAttr getAttr) visitIsSet
(Expression fn) visitLibraryFunction
(FunctionDefinition fn, List<Expression> args) visitLiteral
(Literal literal) visitNot
(Expression not) visitStringEquals
(Expression left, Expression right) visitTreeRule
(List<Rule> rules) Invoked when reaching a tree rule.
-
Constructor Details
-
DefaultVisitor
public DefaultVisitor()
-
-
Method Details
-
getDefault
-
visitLiteral
- Specified by:
visitLiteral
in interfaceExpressionVisitor<R>
-
visitRef
- Specified by:
visitRef
in interfaceExpressionVisitor<R>
-
visitIsSet
- Specified by:
visitIsSet
in interfaceExpressionVisitor<R>
-
visitNot
- Specified by:
visitNot
in interfaceExpressionVisitor<R>
-
visitBoolEquals
- Specified by:
visitBoolEquals
in interfaceExpressionVisitor<R>
-
visitStringEquals
- Specified by:
visitStringEquals
in interfaceExpressionVisitor<R>
-
visitGetAttr
- Specified by:
visitGetAttr
in interfaceExpressionVisitor<R>
-
visitLibraryFunction
- Specified by:
visitLibraryFunction
in interfaceExpressionVisitor<R>
-
visitTreeRule
Description copied from interface:RuleValueVisitor
Invoked when reaching a tree rule.- Specified by:
visitTreeRule
in interfaceRuleValueVisitor<R>
- Parameters:
rules
- the sub-rules within a tree rule.- Returns:
- the visitor return type.
-
visitErrorRule
Description copied from interface:RuleValueVisitor
Invoked when reaching an error rule.- Specified by:
visitErrorRule
in interfaceRuleValueVisitor<R>
- Parameters:
error
- the error expression for the rule.- Returns:
- the visitor return type.
-
visitEndpointRule
Description copied from interface:RuleValueVisitor
Invoked when reaching an endpoint rule.- Specified by:
visitEndpointRule
in interfaceRuleValueVisitor<R>
- Parameters:
endpoint
- the endpoint of the rule.- Returns:
- the visitor return type.
-