Package: org.codehaus.groovy.control

## [Java] Interface CompilationUnit.IPrimaryClassNodeOperation

- org.codehaus.groovy.control.CompilationUnit.PhaseOperation

- All Superinterfaces:
    CompilationUnit.PhaseOperation

      @FunctionalInterface
      public interface CompilationUnit.IPrimaryClassNodeOperation
      extends CompilationUnit.PhaseOperation

  Performs an operation for each primary class node in the compilation.

- - ### Methods Summary

    Methods
    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.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface CompilationUnit.PhaseOperation` | `doPhaseOperation`

- - ### Method Detail

    - #### public void call(SourceUnit source, GeneratorContext context, ClassNode classNode)

      Performs the operation for one primary class node.

      throws:
        CompilationFailedException if processing fails
      Parameters:
        `source` - the source unit owning the class
        `context` - the current generator context
        `classNode` - the class node to process

    - #### public void doPhaseOperation(CompilationUnit unit)

      A loop driver for applying operations to all primary ClassNodes in our AST. Automatically skips units that have already been processed through the current phase.

    - #### public boolean needSortedInput()

      Indicates whether primary classes should be sorted before visiting.

      Returns:
        `true` if sorted input is required