Class AbstractCompiler

    • Field Detail

      • EOL

        protected static final java.lang.String EOL
      • PS

        protected static final java.lang.String PS
    • Constructor Detail

      • AbstractCompiler

        protected AbstractCompiler​(CompilerOutputStyle compilerOutputStyle,
                                   java.lang.String inputFileEnding,
                                   java.lang.String outputFileEnding,
                                   java.lang.String outputFile)
    • Method Detail

      • getLog

        protected org.slf4j.Logger getLog()
        Returns:
        a Logger
      • getLogger

        @Deprecated
        protected org.codehaus.plexus.logging.Logger getLogger()
        Deprecated.
        please use getLog()
        Returns:
        a plexus Logger
      • getCompilerId

        public abstract java.lang.String getCompilerId()
      • getPathString

        public static java.lang.String getPathString​(java.util.List<java.lang.String> pathElements)
      • getSourceFilesForSourceRoot

        protected static java.util.Set<java.lang.String> getSourceFilesForSourceRoot​(CompilerConfiguration config,
                                                                                     java.lang.String sourceLocation)
      • makeClassName

        protected static java.lang.String makeClassName​(java.lang.String fileName,
                                                        java.lang.String sourceDir)
                                                 throws CompilerException
        Throws:
        CompilerException
      • logCompiling

        protected void logCompiling​(java.lang.String[] sourceFiles,
                                    CompilerConfiguration config)
      • joinAnnotationProcessors

        protected static java.lang.String joinAnnotationProcessors​(java.lang.String[] annotationProcessors)
        Joins the configured annotation processor names, skipping blank entries.

        Maven maps an explicitly empty <annotationProcessors/> element to an array holding blank strings rather than to an empty array. Passing those on yields -processor with an empty processor name, which no compiler can resolve. Callers should omit the option entirely when this returns an empty string.

        Parameters:
        annotationProcessors - the configured names, possibly null
        Returns:
        the non-blank names joined by commas, or an empty string if none remain
        Since:
        2.17.1