Package org.codehaus.groovy.tools.javac

## Class JavaStubCompilationUnit

- java.lang.Object
- - org.codehaus.groovy.control.ProcessingUnit
  - - org.codehaus.groovy.control.CompilationUnit
    - - org.codehaus.groovy.tools.javac.JavaStubCompilationUnit

-     public class JavaStubCompilationUnit
      extends CompilationUnit

  Compilation unit to only generate stubs.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.codehaus.groovy.control.CompilationUnit

      `CompilationUnit.ClassgenCallback, CompilationUnit.GroovyClassOperation, CompilationUnit.PrimaryClassNodeOperation, CompilationUnit.ProgressCallback, CompilationUnit.SourceUnitOperation`

  - ### Field Summary

    - ### Fields inherited from class org.codehaus.groovy.control.CompilationUnit

      `ast, astTransformationsContext, classgenCallback, classNodeResolver, classSourcesByPublicClassName, configured, debug, generatedClasses, names, optimizer, progressCallback, queuedSources, resolveVisitor, sources, staticImportVisitor, summariesByPublicClassName, summariesBySourceName, verifier`

    - ### Fields inherited from class org.codehaus.groovy.control.ProcessingUnit

      `classLoader, configuration, errorCollector, phase, phaseComplete`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `JavaStubCompilationUnit​(CompilerConfiguration config, GroovyClassLoader gcl)` |
    `JavaStubCompilationUnit​(CompilerConfiguration config, GroovyClassLoader gcl, java.io.File destDir)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `SourceUnit` | `addSource​(java.io.File file)` | Adds a source file to the unit.
    `SourceUnit` | `addSource​(java.net.URL url)` | Adds a source file to the unit.
    `void` | `compile()` | Synonym for compile(Phases.ALL).
    `void` | `configure​(CompilerConfiguration config)` | Configures its debugging mode and classloader classpath from a given compiler configuration.
    `int` | `getStubCount()` |

    - ### Methods inherited from class org.codehaus.groovy.control.CompilationUnit

      `addClassNode, addFirstPhaseOperation, addNewPhaseOperation, addPhaseOperation, addPhaseOperation, addPhaseOperation, addSource, addSource, addSource, addSources, addSources, applyToGeneratedGroovyClasses, applyToPrimaryClassNodes, applyToSourceUnits, compile, createClassVisitor, dequeued, getAST, getASTTransformationsContext, getClasses, getClassgenCallback, getClassNode, getClassNodeResolver, getClassSourcesByPublicClassName, getFirstClassNode, getProgressCallback, getSummariesByPublicClassName, getSummariesBySourceName, getTransformLoader, isPublicClass, iterator, mark, setClassgenCallback, setClassNodeResolver, setProgressCallback`

    - ### Methods inherited from class org.codehaus.groovy.control.ProcessingUnit

      `completePhase, getClassLoader, getConfiguration, getErrorCollector, getPhase, getPhaseDescription, gotoPhase, nextPhase, setClassLoader, setConfiguration`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JavaStubCompilationUnit

          public JavaStubCompilationUnit​(CompilerConfiguration config,
                                         GroovyClassLoader gcl,
                                         java.io.File destDir)

    - #### JavaStubCompilationUnit

          public JavaStubCompilationUnit​(CompilerConfiguration config,
                                         GroovyClassLoader gcl)

  - ### Method Detail

    - #### getStubCount

          public int getStubCount()

    - #### compile

          public void compile()
                       throws CompilationFailedException

      Description copied from class: `CompilationUnit`
      Synonym for compile(Phases.ALL).
      Overrides:
        `compile` in class `CompilationUnit`
      Throws:
        `CompilationFailedException`

    - #### configure

          public void configure​(CompilerConfiguration config)

      Description copied from class: `CompilationUnit`
      Configures its debugging mode and classloader classpath from a given compiler configuration. This cannot be done more than once due to limitations in `URLClassLoader`.
      Overrides:
        `configure` in class `CompilationUnit`

    - #### addSource

          public SourceUnit addSource​(java.io.File file)

      Description copied from class: `CompilationUnit`
      Adds a source file to the unit.
      Overrides:
        `addSource` in class `CompilationUnit`

    - #### addSource

          public SourceUnit addSource​(java.net.URL url)

      Description copied from class: `CompilationUnit`
      Adds a source file to the unit.
      Overrides:
        `addSource` in class `CompilationUnit`