Class ProcessingUnit

  • Direct Known Subclasses:
    CompilationUnit, SourceUnit

    public abstract class ProcessingUnit
    extends java.lang.Object
    A base class for data structures that can collect messages and errors during processing.
    • Field Detail

      • phase

        protected int phase
        The current phase
      • phaseComplete

        protected boolean phaseComplete
        Set true if phase is finished
      • configuration

        protected CompilerConfiguration configuration
        Configuration and other settings that control processing
      • classLoader

        protected GroovyClassLoader classLoader
        The ClassLoader to use during processing
      • errorCollector

        protected ErrorCollector errorCollector
        a helper to share errors and report them
    • Method Detail

      • configure

        public void configure​(CompilerConfiguration configuration)
        Reconfigures the ProcessingUnit.
      • getClassLoader

        public GroovyClassLoader getClassLoader()
        Returns the class loader in use by this ProcessingUnit.
      • setClassLoader

        public void setClassLoader​(GroovyClassLoader loader)
        Sets the class loader for use by this ProcessingUnit.
      • getPhase

        public int getPhase()
        Returns the current phase.
      • getPhaseDescription

        public java.lang.String getPhaseDescription()
        Returns the description for the current phase.
      • getErrorCollector

        public ErrorCollector getErrorCollector()
        Errors found during the compilation should be reported through the ErrorCollector.
        the ErrorCollector for this ProcessingUnit