Package org.codehaus.groovy.control

# Interface CompilationUnit.ISourceUnitOperation

All Known Implementing Classes:
  `CompilationUnit.SourceUnitOperation`

Enclosing class:
  CompilationUnit

Functional Interface:
  This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface CompilationUnit.ISourceUnitOperation
Performs an operation for each source unit in the compilation.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `call(SourceUnit source)`
  Performs the operation for one source unit.
  `default void`
  `doPhaseOperation(CompilationUnit unit)`
  A loop driver for applying operations to all SourceUnits.

- ## Method Details

  - ### call

    void call(SourceUnit source) throws CompilationFailedException
    Performs the operation for one source unit.
    Parameters:
      `source` - the source unit to process
    Throws:
      `CompilationFailedException` - if processing fails

  - ### doPhaseOperation

    default void doPhaseOperation(CompilationUnit unit) throws CompilationFailedException
    A loop driver for applying operations to all SourceUnits. Automatically skips units that have already been processed through the current phase.
    Throws:
      `CompilationFailedException`