Class PrepareForCodegenVisitor
- java.lang.Object
-
- software.amazon.awssdk.codegen.poet.rules2.RewriteRuleExpressionVisitor
-
- software.amazon.awssdk.codegen.poet.rules2.PrepareForCodegenVisitor
-
- All Implemented Interfaces:
RuleExpressionVisitor<RuleExpression>
public final class PrepareForCodegenVisitor extends RewriteRuleExpressionVisitor
Visitor that rewrites some expressions in preparation for codegen and also renaming locals assignments to use idiomatic java names. This visitor in particular rewrites variable references to the equivalent togetAttr(params, NAME)
orgetAttr(locals, NAME)
, depending on whether the reference is an endpoint params variable or a locally assigned one.
-
-
Constructor Summary
Constructors Constructor Description PrepareForCodegenVisitor(SymbolTable symbolTable)
-
Method Summary
-
Methods inherited from class software.amazon.awssdk.codegen.poet.rules2.RewriteRuleExpressionVisitor
visitAll, visitAllWith, visitBooleanAndExpression, visitEndpointExpression, visitErrorExpression, visitHeadersExpression, visitListExpression, visitLiteralBooleanExpression, visitLiteralIntegerExpression, visitLiteralStringExpression, visitMemberAccessExpression, visitMethodCallExpression, visitPropertiesExpression, visitRuleSetExpression, visitStringConcatExpression
-
-
-
-
Constructor Detail
-
PrepareForCodegenVisitor
public PrepareForCodegenVisitor(SymbolTable symbolTable)
-
-
Method Detail
-
symbolTable
public SymbolTable symbolTable()
-
visitBooleanNotExpression
public RuleExpression visitBooleanNotExpression(BooleanNotExpression e)
- Specified by:
visitBooleanNotExpression
in interfaceRuleExpressionVisitor<RuleExpression>
- Overrides:
visitBooleanNotExpression
in classRewriteRuleExpressionVisitor
-
visitFunctionCallExpression
public RuleExpression visitFunctionCallExpression(FunctionCallExpression e)
- Specified by:
visitFunctionCallExpression
in interfaceRuleExpressionVisitor<RuleExpression>
- Overrides:
visitFunctionCallExpression
in classRewriteRuleExpressionVisitor
-
visitVariableReferenceExpression
public RuleExpression visitVariableReferenceExpression(VariableReferenceExpression e)
- Specified by:
visitVariableReferenceExpression
in interfaceRuleExpressionVisitor<RuleExpression>
- Overrides:
visitVariableReferenceExpression
in classRewriteRuleExpressionVisitor
-
visitIndexedAccessExpression
public RuleExpression visitIndexedAccessExpression(IndexedAccessExpression e)
- Specified by:
visitIndexedAccessExpression
in interfaceRuleExpressionVisitor<RuleExpression>
- Overrides:
visitIndexedAccessExpression
in classRewriteRuleExpressionVisitor
-
visitLetExpression
public RuleExpression visitLetExpression(LetExpression e)
- Specified by:
visitLetExpression
in interfaceRuleExpressionVisitor<RuleExpression>
- Overrides:
visitLetExpression
in classRewriteRuleExpressionVisitor
-
-