Class AbstractCompiler
java.lang.Object
org.codehaus.plexus.compiler.AbstractCompiler
- All Implemented Interfaces:
Compiler
- Author:
- Jason van Zyl , Michal Maczka , Trygve Laugstøl
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractCompiler(CompilerOutputStyle compilerOutputStyle, String inputFileEnding, String outputFileEnding, String outputFile) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanUpdateTarget(CompilerConfiguration configuration) abstract StringgetInputFileEnding(CompilerConfiguration configuration) protected org.slf4j.LoggergetLog()protected org.codehaus.plexus.logging.LoggerDeprecated.getOutputFile(CompilerConfiguration configuration) getOutputFileEnding(CompilerConfiguration configuration) static StringgetPathString(List<String> pathElements) protected static String[]getSourceFiles(CompilerConfiguration config) getSourceFilesForSourceRoot(CompilerConfiguration config, String sourceLocation) protected static StringjoinAnnotationProcessors(String[] annotationProcessors) Joins the configured annotation processor names, skipping blank entries.protected voidlogCompiling(String[] sourceFiles, CompilerConfiguration config) protected static StringmakeClassName(String fileName, String sourceDir) performCompile(CompilerConfiguration configuration) Performs the compilation of the project.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Compiler
createCommandLine, supportsIncrementalCompilation
-
Field Details
-
EOL
-
PS
-
-
Constructor Details
-
AbstractCompiler
protected AbstractCompiler(CompilerOutputStyle compilerOutputStyle, String inputFileEnding, String outputFileEnding, String outputFile)
-
-
Method Details
-
getLog
protected org.slf4j.Logger getLog()- Returns:
- a Logger
-
getLogger
Deprecated.please usegetLog()- Returns:
- a plexus Logger
-
getCompilerId
-
performCompile
Description copied from interface:CompilerPerforms the compilation of the project. Clients must implement this method.- Specified by:
performCompilein interfaceCompiler- Parameters:
configuration- the configuration description of the compilation to perform- Returns:
- the result of the compilation returned by the language processor
- Throws:
CompilerException
-
getCompilerOutputStyle
- Specified by:
getCompilerOutputStylein interfaceCompiler
-
getInputFileEnding
- Specified by:
getInputFileEndingin interfaceCompiler- Throws:
CompilerException
-
getOutputFileEnding
- Specified by:
getOutputFileEndingin interfaceCompiler- Throws:
CompilerException
-
getOutputFile
- Specified by:
getOutputFilein interfaceCompiler- Throws:
CompilerException
-
canUpdateTarget
- Specified by:
canUpdateTargetin interfaceCompiler- Throws:
CompilerException
-
getPathString
-
getSourceFilesForSourceRoot
protected static Set<String> getSourceFilesForSourceRoot(CompilerConfiguration config, String sourceLocation) -
getSourceFiles
-
makeClassName
- Throws:
CompilerException
-
logCompiling
-
joinAnnotationProcessors
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-processorwith 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, possiblynull- Returns:
- the non-blank names joined by commas, or an empty string if none remain
- Since:
- 2.17.1
-
getLog()