public class FileSystemCompiler extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FileSystemCompiler.CompilationOptions |
static class |
FileSystemCompiler.VersionProvider |
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 picocli.CommandLine |
configureParser(FileSystemCompiler.CompilationOptions options) |
static Options |
createCompilationOptions()
Deprecated.
|
static File |
createTempDir()
Deprecated.
|
static void |
deleteRecursive(File file) |
static void |
displayHelp()
Prints the usage help message for
FileSystemCompiler.CompilationOptions to stderr. |
static void |
displayHelp(Options options)
Deprecated.
use
displayHelp(PrintWriter) instead |
static void |
displayHelp(PrintWriter writer)
Prints the usage help message for the
FileSystemCompiler.CompilationOptions to the specified PrintWriter. |
static void |
displayVersion()
Prints version information to stderr.
|
static void |
displayVersion(PrintWriter writer)
Prints version information to the specified PrintWriter.
|
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)
Deprecated.
|
static String[] |
generateFileNamesFromOptions(CommandLine cli)
Deprecated.
|
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()
FileSystemCompiler.CompilationOptions
to stderr.displayHelp(PrintWriter)
public static void displayHelp(PrintWriter writer)
FileSystemCompiler.CompilationOptions
to the specified PrintWriter.public static void displayVersion()
displayVersion(PrintWriter)
public static void displayVersion(PrintWriter writer)
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 picocli.CommandLine configureParser(FileSystemCompiler.CompilationOptions options)
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 void deleteRecursive(File file)
@Deprecated public static void displayHelp(Options options)
displayHelp(PrintWriter)
instead@Deprecated public static CompilerConfiguration generateCompilerConfigurationFromOptions(CommandLine cli)
@Deprecated public static String[] generateFileNamesFromOptions(CommandLine cli)
@Deprecated public static Options createCompilationOptions()
@Deprecated public static File createTempDir() throws IOException
DefaultGroovyStaticMethods.createTempDir(java.io.File, String, String)
instead.IOException