public class FileSystemCompiler extends Object
Constructor and Description |
---|
FileSystemCompiler(CompilerConfiguration configuration) |
FileSystemCompiler(CompilerConfiguration configuration,
CompilationUnit cu) |
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.
|
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(File[] files) |
void |
compile(String[] paths) |
static Options |
createCompilationOptions() |
static File |
createTempDir()
Deprecated.
|
static void |
deleteRecursive(File file) |
static void |
displayHelp(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(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) |
public FileSystemCompiler(CompilerConfiguration configuration) throws ConfigurationException
ConfigurationException
public FileSystemCompiler(CompilerConfiguration configuration, CompilationUnit cu) throws ConfigurationException
ConfigurationException
public static void displayHelp(Options options)
public static void displayVersion()
public static int checkFiles(String[] filenames)
public static boolean validateFiles(String[] filenames)
public static void commandLineCompile(String[] args) throws Exception
Exception
public static void commandLineCompile(String[] args, boolean lookupUnnamedFiles) throws Exception
Exception
public static void main(String[] args)
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
args
- command line argumentspublic static void commandLineCompileWithErrorHandling(String[] args, boolean lookupUnnamedFiles)
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
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, String[] filenames) throws Exception
Exception
public static void doCompilation(CompilerConfiguration configuration, CompilationUnit unit, String[] filenames, boolean lookupUnnamedFiles) throws Exception
Exception
public static String[] generateFileNamesFromOptions(CommandLine cli)
public static CompilerConfiguration generateCompilerConfigurationFromOptions(CommandLine cli) throws IOException
IOException
public static Options createCompilationOptions()
@Deprecated public static File createTempDir() throws IOException
DefaultGroovyStaticMethods.createTempDir(java.io.File, String, String)
instead.IOException
public static void deleteRecursive(File file)