protected class StaticTypeCheckingVisitor.VariableExpressionTypeMemoizer
extends ClassCodeVisitorSupport
Memoizes inferred variable types so they can be restored after temporary rewrites.
| Constructor and description |
|---|
VariableExpressionTypeMemoizer(Map<VariableExpression, ClassNode> varOrigType)Creates a memoizer that records all visible variable expressions. |
VariableExpressionTypeMemoizer(Map<VariableExpression, ClassNode> varOrigType, boolean onlySharedVariables)Creates a memoizer with optional filtering for shared variables only. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected SourceUnit |
getSourceUnit()* Provides access to the SourceUnit for error reporting during visitation. * Implementations must override this method. * *
|
|
public void |
visitDeclarationExpression(DeclarationExpression expression)* Visits a DeclarationExpression with annotation processing, traversing expression annotations * before delegating to parent traversal. * *
|
|
public void |
visitVariableExpression(VariableExpression expression)* Visits a VariableExpression. No traversal is performed as variable expressions contain no child expressions. * *
|
Creates a memoizer that records all visible variable expressions.
Creates a memoizer with optional filtering for shared variables only.
* Provides access to the SourceUnit for error reporting during visitation. * Implementations must override this method. * *
* Visits a DeclarationExpression with annotation processing, traversing expression annotations * before delegating to parent traversal. * *
expression - the declaration expression to visit* Visits a VariableExpression. No traversal is performed as variable expressions contain no child expressions. * *
expression - the variable expressionCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.