Package: org.codehaus.groovy.tools

## [Java] Class FileSystemCompiler

- org.codehaus.groovy.tools.FileSystemCompiler

- Command-line compiler (aka. `groovyc`).

- - ### Constructor Summary

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

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name 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.
    `` | `static void` | `commandLineCompile(String[] args, boolean lookupUnnamedFiles)` Same as main(args) except that exceptions are thrown out instead of causing the VM to exit and the lookup for .groovy files can be controlled
    `` | `static void` | `commandLineCompileWithErrorHandling(String[] args, boolean lookupUnnamedFiles)` Primary entry point for compiling from the command line (using the groovyc script).
    `` | `void` | `compile(String[] paths)`
    `` | `void` | `compile(File[] files)`
    `` | `static org.apache.commons.cli.Options` | `createCompilationOptions()`
    `` | `static File` | `createTempDir()` Creates a temporary directory in the default temporary directory (as specified by the system property java.io.tmpdir.
    `` | `static void` | `deleteRecursive(File file)`
    `` | `static void` | `displayHelp(org.apache.commons.cli.Options options)`
    `` | `static void` | `displayVersion()`
    `` | `static void` | `doCompilation(CompilerConfiguration configuration, CompilationUnit unit, String[] filenames)`
    `` | `static void` | `doCompilation(CompilerConfiguration configuration, CompilationUnit unit, String[] filenames, boolean lookupUnnamedFiles)`
    `` | `static CompilerConfiguration` | `generateCompilerConfigurationFromOptions(org.apache.commons.cli.CommandLine cli)`
    `` | `static String[]` | `generateFileNamesFromOptions(org.apache.commons.cli.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)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, toString, hashCode, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### public FileSystemCompiler(CompilerConfiguration configuration)

    - #### public FileSystemCompiler(CompilerConfiguration configuration, CompilationUnit cu)

  - ### Method Detail

    - #### public static int checkFiles(String[] filenames)

    - #### public static void commandLineCompile(String[] args)

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

    - #### public static void commandLineCompile(String[] args, boolean lookupUnnamedFiles)

      Same as main(args) except that exceptions are thrown out instead of causing the VM to exit and the lookup for .groovy files can be controlled

    - #### public static void commandLineCompileWithErrorHandling(String[] args, boolean lookupUnnamedFiles)

      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

      Parameters:
        `args` - command line arguments
        `lookupUnnamedFiles` - do a lookup for .groovy files not part of the given list of files to compile

    - #### public void compile(String[] paths)

    - #### public void compile(File[] files)

    - #### @SuppressWarnings({"AccessStaticViaInstance"}) public static org.apache.commons.cli.Options createCompilationOptions()

    - #### @Deprecated public static File createTempDir()

      Creates a temporary directory in the default temporary directory (as specified by the system property java.io.tmpdir.

      deprecated:
        Use DefaultGroovyStaticMethods#createTempDir(java.io.File, String, String) instead.

    - #### public static void deleteRecursive(File file)

    - #### public static void displayHelp(org.apache.commons.cli.Options options)

    - #### public static void displayVersion()

    - #### public static void doCompilation(CompilerConfiguration configuration, CompilationUnit unit, String[] filenames)

    - #### public static void doCompilation(CompilerConfiguration configuration, CompilationUnit unit, String[] filenames, boolean lookupUnnamedFiles)

    - #### public static CompilerConfiguration generateCompilerConfigurationFromOptions(org.apache.commons.cli.CommandLine cli)

    - #### public static String[] generateFileNamesFromOptions(org.apache.commons.cli.CommandLine cli)

    - #### 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

      Parameters:
        `args` - command line arguments

    - #### public static boolean validateFiles(String[] filenames)