public class PlaceholderVisitor
extends ClassCodeVisitorSupport
Marks repeated underscore placeholders used in tuple and closure parameters.
| Constructor and description |
|---|
PlaceholderVisitor(CompilationUnit compilationUnit, SourceUnit source)Creates a visitor for placeholder analysis. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected SourceUnit |
getSourceUnit()Returns the source unit currently being visited. |
|
public static boolean |
isPlaceholder(ASTNode node)Checks whether the supplied node has been marked as a placeholder. |
|
public void |
visitClosureExpression(ClosureExpression expression)Visit the Closure (or Lambda) marking underscore-named parameters as placeholders |
|
public void |
visitDeclarationExpression(DeclarationExpression expression)Visit the declaration marking underscore-named variables in multi-assignments as placeholders |
Creates a visitor for placeholder analysis.
compilationUnit - the owning compilation unitsource - the source unit being visitedReturns the source unit currently being visited.
Checks whether the supplied node has been marked as a placeholder.
node - the node to inspecttrue if the node is a placeholderVisit the Closure (or Lambda) marking underscore-named parameters as placeholders
expression - the expression to checkVisit the declaration marking underscore-named variables in multi-assignments as placeholders
expression - the expression to checkCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.