Class JavacCompiler

    • Constructor Detail

      • JavacCompiler

        public JavacCompiler()
    • Method Detail

      • isJava16

        protected static boolean isJava16()
      • createCommandLine

        public java.lang.String[] createCommandLine​(CompilerConfiguration config)
                                             throws CompilerException
        Description copied from interface: Compiler
        Create the command line that would be executed using this configuration. If this particular compiler has no concept of a command line then returns null.
        Parameters:
        config - the CompilerConfiguration describing the compilation
        Returns:
        an array of Strings that make up the command line, or null if this compiler has no concept of command line
        Throws:
        CompilerException - if there was an error generating the command line
      • buildCompilerArguments

        public static java.lang.String[] buildCompilerArguments​(CompilerConfiguration config,
                                                                java.lang.String[] sourceFiles)
      • compileOutOfProcess

        protected CompilerResult compileOutOfProcess​(CompilerConfiguration config,
                                                     java.lang.String executable,
                                                     java.lang.String[] args)
                                              throws CompilerException
        Compile the java sources in a external process, calling an external executable, like javac.
        Parameters:
        config - compiler configuration
        executable - name of the executable to launch
        args - arguments for the executable launched
        Returns:
        a CompilerResult object encapsulating the result of the compilation and any compiler messages
        Throws:
        CompilerException