org.codehaus.groovy.tools

## Class FileSystemCompiler

- java.lang.Object
- - org.codehaus.groovy.tools.FileSystemCompiler

-     public class FileSystemCompiler
      extends Object

  Command-line compiler (aka. `groovyc`).
  Version:
    $Id: FileSystemCompiler.java 21452 2011-02-03 12:02:48Z ait $

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileSystemCompiler(CompilerConfiguration configuration)`
    `FileSystemCompiler(CompilerConfiguration configuration, CompilationUnit cu)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `checkFiles(String[] filenames)`
    `static void` | `commandLineCompile(String[] args)` Same as main(args) except that exceptions are thrown out instead of causing the VM to exit.
    `void` | `compile(File[] files)`
    `void` | `compile(String[] paths)`
    `static Options` | `createCompilationOptions()`
    `static File` | `createTempDir()`
    `static void` | `deleteRecursive(File file)`
    `static void` | `displayHelp(Options options)`
    `static void` | `displayVersion()`
    `static void` | `doCompilation(CompilerConfiguration configuration, CompilationUnit unit, String[] filenames)`
    `static CompilerConfiguration` | `generateCompilerConfigurationFromOptions(CommandLine cli)`
    `static String[]` | `generateFileNamesFromOptions(CommandLine cli)`
    `static void` | `main(String[] args)` Primary entry point for compiling from the command line (using the groovyc script).
    `static boolean` | `validateFiles(String[] filenames)`

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

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

- - ### Constructor Detail

    - #### FileSystemCompiler

          public FileSystemCompiler(CompilerConfiguration configuration)
                             throws ConfigurationException

      Throws:
        `ConfigurationException`

    - #### FileSystemCompiler

          public FileSystemCompiler(CompilerConfiguration configuration,
                            CompilationUnit cu)
                             throws ConfigurationException

      Throws:
        `ConfigurationException`

  - ### Method Detail

    - #### compile

          public void compile(String[] paths)
                       throws Exception

      Throws:
        `Exception`

    - #### compile

          public void compile(File[] files)
                       throws Exception

      Throws:
        `Exception`

    - #### displayHelp

          public static void displayHelp(Options options)

    - #### displayVersion

          public static void displayVersion()

    - #### checkFiles

          public static int checkFiles(String[] filenames)

    - #### validateFiles

          public static boolean validateFiles(String[] filenames)

    - #### commandLineCompile

          public static void commandLineCompile(String[] args)
                                         throws Exception

      Same as main(args) except that exceptions are thrown out instead of causing the VM to exit.
      Throws:
        `Exception`

    - #### main

          public static void main(String[] args)

      Primary entry point for compiling from the command line (using the groovyc script). If calling inside a process and you don't want the JVM to exit on an error call commandLineCompile(String[]), which this method simply wraps

    - #### doCompilation

          public static void doCompilation(CompilerConfiguration configuration,
                           CompilationUnit unit,
                           String[] filenames)
                                    throws Exception

      Throws:
        `Exception`

    - #### generateFileNamesFromOptions

          public static String[] generateFileNamesFromOptions(CommandLine cli)

    - #### generateCompilerConfigurationFromOptions

          public static CompilerConfiguration generateCompilerConfigurationFromOptions(CommandLine cli)

    - #### createCompilationOptions

          public static Options createCompilationOptions()

    - #### createTempDir

          public static File createTempDir()
                                    throws IOException

      Throws:
        `IOException`

    - #### deleteRecursive

          public static void deleteRecursive(File file)