public class FileSystemCompiler
extends java.lang.Object
Constructor and Description |
---|
FileSystemCompiler(CompilerConfiguration configuration) |
FileSystemCompiler(CompilerConfiguration configuration,
CompilationUnit cu) |
Modifier and Type | Method and Description |
---|---|
static int |
checkFiles(java.lang.String[] filenames) |
static void |
commandLineCompile(java.lang.String[] args)
Same as main(args) except that exceptions are thrown out instead of causing
the VM to exit.
|
static void |
commandLineCompile(java.lang.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(java.lang.String[] args,
boolean lookupUnnamedFiles)
Primary entry point for compiling from the command line
(using the groovyc script).
|
void |
compile(java.io.File[] files) |
void |
compile(java.lang.String[] paths) |
static org.apache.commons.cli.Options |
createCompilationOptions() |
static java.io.File |
createTempDir() |
static void |
deleteRecursive(java.io.File file) |
static void |
displayHelp(org.apache.commons.cli.Options options) |
static void |
displayVersion() |
static void |
doCompilation(CompilerConfiguration configuration,
CompilationUnit unit,
java.lang.String[] filenames) |
static void |
doCompilation(CompilerConfiguration configuration,
CompilationUnit unit,
java.lang.String[] filenames,
boolean lookupUnnamedFiles) |
static CompilerConfiguration |
generateCompilerConfigurationFromOptions(org.apache.commons.cli.CommandLine cli) |
static java.lang.String[] |
generateFileNamesFromOptions(org.apache.commons.cli.CommandLine cli) |
static void |
main(java.lang.String[] args)
Primary entry point for compiling from the command line
(using the groovyc script).
|
static boolean |
validateFiles(java.lang.String[] filenames) |
public FileSystemCompiler(CompilerConfiguration configuration) throws ConfigurationException
ConfigurationException
public FileSystemCompiler(CompilerConfiguration configuration, CompilationUnit cu) throws ConfigurationException
ConfigurationException
public void compile(java.lang.String[] paths) throws java.lang.Exception
java.lang.Exception
public void compile(java.io.File[] files) throws java.lang.Exception
java.lang.Exception
public static void displayHelp(org.apache.commons.cli.Options options)
public static void displayVersion()
public static int checkFiles(java.lang.String[] filenames)
public static boolean validateFiles(java.lang.String[] filenames)
public static void commandLineCompile(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public static void commandLineCompile(java.lang.String[] args, boolean lookupUnnamedFiles) throws java.lang.Exception
java.lang.Exception
public static void main(java.lang.String[] args)
args
- command line argumentspublic static void commandLineCompileWithErrorHandling(java.lang.String[] args, boolean lookupUnnamedFiles)
args
- command line argumentslookupUnnamedFiles
- do a lookup for .groovy files not part of
the given list of files to compilepublic static void doCompilation(CompilerConfiguration configuration, CompilationUnit unit, java.lang.String[] filenames) throws java.lang.Exception
java.lang.Exception
public static void doCompilation(CompilerConfiguration configuration, CompilationUnit unit, java.lang.String[] filenames, boolean lookupUnnamedFiles) throws java.lang.Exception
java.lang.Exception
public static java.lang.String[] generateFileNamesFromOptions(org.apache.commons.cli.CommandLine cli)
public static CompilerConfiguration generateCompilerConfigurationFromOptions(org.apache.commons.cli.CommandLine cli)
public static org.apache.commons.cli.Options createCompilationOptions()
public static java.io.File createTempDir() throws java.io.IOException
java.io.IOException
public static void deleteRecursive(java.io.File file)