Class FileSystemCompiler


  • public class FileSystemCompiler
    extends Object
    Command-line compiler (aka. groovyc).
    • Method Detail

      • displayHelp

        public static void displayHelp​(org.apache.commons.cli.Options options)
      • displayVersion

        public static void displayVersion()
      • checkFiles

        public static int checkFiles​(String[] filenames)
      • validateFiles

        public static boolean validateFiles​(String[] filenames)
      • commandLineCompile

        public static void commandLineCompile​(String[] args)
                                       throws Exception
        Same as main(args) except that exceptions are thrown out instead of causing the VM to exit.
        Throws:
        Exception
      • commandLineCompile

        public static void commandLineCompile​(String[] args,
                                              boolean lookupUnnamedFiles)
                                       throws Exception
        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
      • main

        public static void main​(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
      • commandLineCompileWithErrorHandling

        public static void commandLineCompileWithErrorHandling​(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
      • generateFileNamesFromOptions

        public static String[] generateFileNamesFromOptions​(org.apache.commons.cli.CommandLine cli)
      • createCompilationOptions

        public static org.apache.commons.cli.Options createCompilationOptions()
      • deleteRecursive

        public static void deleteRecursive​(File file)