Package org.codehaus.groovy.control

# Interface CompilationUnit.ProgressCallback

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.ProgressCallback
A callback interface you can use to get a callback after every unit of the compile process. You will be called-back with a ProcessingUnit and a phase indicator. Use setProgressCallback() before running compile() to set your callback.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `call(ProcessingUnit context, int phase)`
  Called after a compilation phase finishes for a processing unit.

- ## Method Details

  - ### call

    void call(ProcessingUnit context, int phase) throws CompilationFailedException
    Called after a compilation phase finishes for a processing unit.
    Parameters:
      `context` - the processing unit that advanced
      `phase` - the phase that just completed
    Throws:
      `CompilationFailedException` - if callback processing fails