Package org.codehaus.groovy.tools

# Class Compiler

java.lang.Object
org.codehaus.groovy.tools.Compiler

public class Compiler extends Object
A convenience front end for getting standard compilations done. All compile() routines generate classes to the filesystem.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Compiler`
  `DEFAULT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Compiler()`
  Initializes the Compiler with default configuration.
  `Compiler(CompilerConfiguration configuration)`
  Initializes the Compiler with the specified configuration.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `compile(File file)`
  Compiles a single File.
  `void`
  `compile(File[] files)`
  Compiles a series of Files.
  `void`
  `compile(String[] files)`
  Compiles a series of Files from file names.
  `void`
  `compile(String name, String code)`
  Compiles a string of code.

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

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

- ## Field Details

  - ### DEFAULT

    public static final Compiler DEFAULT

- ## Constructor Details

  - ### Compiler

    public Compiler()
    Initializes the Compiler with default configuration.

  - ### Compiler

    public Compiler(CompilerConfiguration configuration)
    Initializes the Compiler with the specified configuration.

- ## Method Details

  - ### compile

    public void compile(File file) throws CompilationFailedException
    Compiles a single File.
    Throws:
      `CompilationFailedException`

  - ### compile

    public void compile(File[] files) throws CompilationFailedException
    Compiles a series of Files.
    Throws:
      `CompilationFailedException`

  - ### compile

    public void compile(String[] files) throws CompilationFailedException
    Compiles a series of Files from file names.
    Throws:
      `CompilationFailedException`

  - ### compile

    public void compile(String name, String code) throws CompilationFailedException
    Compiles a string of code.
    Throws:
      `CompilationFailedException`