Package org.codehaus.groovy.tools
Class FileSystemCompiler
java.lang.Object
org.codehaus.groovy.tools.FileSystemCompiler
Command-line compiler (aka. groovyc).
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
-
Constructor Summary
ConstructorDescriptionFileSystemCompiler
(CompilerConfiguration configuration) FileSystemCompiler
(CompilerConfiguration configuration, CompilationUnit cu) -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 controlledstatic void
commandLineCompileWithErrorHandling
(String[] args, boolean lookupUnnamedFiles) Primary entry point for compiling from the command line (using the groovyc script).void
void
static picocli.CommandLine
static void
deleteRecursive
(File file) static void
Prints the usage help message forFileSystemCompiler.CompilationOptions
to stderr.static void
displayHelp
(PrintWriter writer) Prints the usage help message for theFileSystemCompiler.CompilationOptions
to the specified PrintWriter.static void
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 void
Primary entry point for compiling from the command line (using the groovyc script).static boolean
validateFiles
(String[] filenames)
-
Constructor Details
-
FileSystemCompiler
- Throws:
ConfigurationException
-
FileSystemCompiler
public FileSystemCompiler(CompilerConfiguration configuration, CompilationUnit cu) throws ConfigurationException - Throws:
ConfigurationException
-
-
Method Details
-
displayHelp
public static void displayHelp()Prints the usage help message forFileSystemCompiler.CompilationOptions
to stderr.- Since:
- 2.5
- See Also:
-
displayHelp
Prints the usage help message for theFileSystemCompiler.CompilationOptions
to the specified PrintWriter.- Since:
- 2.5
-
displayVersion
public static void displayVersion()Prints version information to stderr.- See Also:
-
displayVersion
Prints version information to the specified PrintWriter.- Since:
- 2.5
-
checkFiles
-
validateFiles
-
commandLineCompile
Same as main(args) except that exceptions are thrown out instead of causing the VM to exit.- Throws:
Exception
-
commandLineCompile
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- Throws:
Exception
-
configureParser
-
main
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
-
commandLineCompileWithErrorHandling
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 argumentslookupUnnamedFiles
- do a lookup for .groovy files not part of the given list of files to compile
-
doCompilation
public static void doCompilation(CompilerConfiguration configuration, CompilationUnit unit, String[] filenames) throws Exception - Throws:
Exception
-
doCompilation
public static void doCompilation(CompilerConfiguration configuration, CompilationUnit unit, String[] filenames, boolean lookupUnnamedFiles) throws Exception - Throws:
Exception
-
deleteRecursive
-
compile
- Throws:
Exception
-
compile
- Throws:
Exception
-