@FunctionalInterface
public interface CompilationUnit.IPrimaryClassNodeOperation
extends CompilationUnit.PhaseOperation
Performs an operation for each primary class node in the compilation.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
call(SourceUnit source, GeneratorContext context, ClassNode classNode)Performs the operation for one primary class node. |
|
public void |
doPhaseOperation(CompilationUnit unit)A loop driver for applying operations to all primary ClassNodes in our AST. |
|
public boolean |
needSortedInput()Indicates whether primary classes should be sorted before visiting. |
| Methods inherited from class | Name |
|---|---|
interface CompilationUnit.PhaseOperation |
doPhaseOperation |
Performs the operation for one primary class node.
source - the source unit owning the class, or null when the class node was
supplied directly via CompilationUnit.addClassNode and so has no
originating source. Implementations must tolerate null here: an unguarded
dereference is reported as a GroovyBugError wrapping the
NullPointerException, which reads as a compiler bug rather than as a fault
in the implementation.context - the current generator contextclassNode - the class node to processA loop driver for applying operations to all primary ClassNodes in our AST. Automatically skips units that have already been processed through the current phase.
Indicates whether primary classes should be sorted before visiting.
true if sorted input is required