Package org.codehaus.groovy.tools
Class FileSystemCompiler
- java.lang.Object
- 
- org.codehaus.groovy.tools.FileSystemCompiler
 
- 
 public class FileSystemCompiler extends java.lang.ObjectCommand-line compiler (aka. groovyc).
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classFileSystemCompiler.CompilationOptionsstatic classFileSystemCompiler.VersionProvider
 - 
Constructor SummaryConstructors Constructor Description FileSystemCompiler(CompilerConfiguration configuration)FileSystemCompiler(CompilerConfiguration configuration, CompilationUnit cu)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static intcheckFiles(java.lang.String[] filenames)static voidcommandLineCompile(java.lang.String[] args)Same as main(args) except that exceptions are thrown out instead of causing the VM to exit.static voidcommandLineCompile(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 controlledstatic voidcommandLineCompileWithErrorHandling(java.lang.String[] args, boolean lookupUnnamedFiles)Primary entry point for compiling from the command line (using the groovyc script).voidcompile(java.io.File[] files)voidcompile(java.lang.String[] paths)static picocli.CommandLineconfigureParser(FileSystemCompiler.CompilationOptions options)static OptionscreateCompilationOptions()Deprecated.static java.io.FilecreateTempDir()Deprecated.static voiddeleteRecursive(java.io.File file)static voiddisplayHelp()Prints the usage help message forFileSystemCompiler.CompilationOptionsto stderr.static voiddisplayHelp(java.io.PrintWriter writer)Prints the usage help message for theFileSystemCompiler.CompilationOptionsto the specified PrintWriter.static voiddisplayHelp(Options options)Deprecated.usedisplayHelp(PrintWriter)insteadstatic voiddisplayVersion()Prints version information to stderr.static voiddisplayVersion(java.io.PrintWriter writer)Prints version information to the specified PrintWriter.static voiddoCompilation(CompilerConfiguration configuration, CompilationUnit unit, java.lang.String[] filenames)static voiddoCompilation(CompilerConfiguration configuration, CompilationUnit unit, java.lang.String[] filenames, boolean lookupUnnamedFiles)static CompilerConfigurationgenerateCompilerConfigurationFromOptions(CommandLine cli)Deprecated.static java.lang.String[]generateFileNamesFromOptions(CommandLine cli)Deprecated.static voidmain(java.lang.String[] args)Primary entry point for compiling from the command line (using the groovyc script).static booleanvalidateFiles(java.lang.String[] filenames)
 
- 
- 
- 
Constructor Detail- 
FileSystemCompilerpublic FileSystemCompiler(CompilerConfiguration configuration) throws ConfigurationException - Throws:
- ConfigurationException
 
 - 
FileSystemCompilerpublic FileSystemCompiler(CompilerConfiguration configuration, CompilationUnit cu) throws ConfigurationException - Throws:
- ConfigurationException
 
 
- 
 - 
Method Detail- 
displayHelppublic static void displayHelp() Prints the usage help message forFileSystemCompiler.CompilationOptionsto stderr.- Since:
- 2.5
- See Also:
- displayHelp(PrintWriter)
 
 - 
displayHelppublic static void displayHelp(java.io.PrintWriter writer) Prints the usage help message for theFileSystemCompiler.CompilationOptionsto the specified PrintWriter.- Since:
- 2.5
 
 - 
displayVersionpublic static void displayVersion() Prints version information to stderr.- See Also:
- displayVersion(PrintWriter)
 
 - 
displayVersionpublic static void displayVersion(java.io.PrintWriter writer) Prints version information to the specified PrintWriter.- Since:
- 2.5
 
 - 
checkFilespublic static int checkFiles(java.lang.String[] filenames) 
 - 
validateFilespublic static boolean validateFiles(java.lang.String[] filenames) 
 - 
commandLineCompilepublic static void commandLineCompile(java.lang.String[] args) throws java.lang.ExceptionSame as main(args) except that exceptions are thrown out instead of causing the VM to exit.- Throws:
- java.lang.Exception
 
 - 
commandLineCompilepublic static void commandLineCompile(java.lang.String[] args, boolean lookupUnnamedFiles) throws java.lang.ExceptionSame 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:
- java.lang.Exception
 
 - 
configureParserpublic static picocli.CommandLine configureParser(FileSystemCompiler.CompilationOptions options) 
 - 
mainpublic static void main(java.lang.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
 
 - 
commandLineCompileWithErrorHandlingpublic static void commandLineCompileWithErrorHandling(java.lang.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
 
 - 
doCompilationpublic static void doCompilation(CompilerConfiguration configuration, CompilationUnit unit, java.lang.String[] filenames) throws java.lang.Exception - Throws:
- java.lang.Exception
 
 - 
doCompilationpublic static void doCompilation(CompilerConfiguration configuration, CompilationUnit unit, java.lang.String[] filenames, boolean lookupUnnamedFiles) throws java.lang.Exception - Throws:
- java.lang.Exception
 
 - 
deleteRecursivepublic static void deleteRecursive(java.io.File file) 
 - 
compilepublic void compile(java.lang.String[] paths) throws java.lang.Exception- Throws:
- java.lang.Exception
 
 - 
compilepublic void compile(java.io.File[] files) throws java.lang.Exception- Throws:
- java.lang.Exception
 
 - 
displayHelp@Deprecated public static void displayHelp(Options options) Deprecated.usedisplayHelp(PrintWriter)instead
 - 
generateCompilerConfigurationFromOptions@Deprecated public static CompilerConfiguration generateCompilerConfigurationFromOptions(CommandLine cli) Deprecated.
 - 
generateFileNamesFromOptions@Deprecated public static java.lang.String[] generateFileNamesFromOptions(CommandLine cli) Deprecated.
 - 
createCompilationOptions@Deprecated public static Options createCompilationOptions() Deprecated.
 - 
createTempDir@Deprecated public static java.io.File createTempDir() throws java.io.IOExceptionDeprecated.Creates a temporary directory in the default temporary directory (as specified by the system property java.io.tmpdir.- Throws:
- java.io.IOException
 
 
- 
 
-