Package org.codehaus.plexus.compiler
Class AbstractCompiler
- java.lang.Object
-
- org.codehaus.plexus.logging.AbstractLogEnabled
-
- org.codehaus.plexus.compiler.AbstractCompiler
-
- All Implemented Interfaces:
Compiler,org.codehaus.plexus.logging.LogEnabled
public abstract class AbstractCompiler extends org.codehaus.plexus.logging.AbstractLogEnabled implements Compiler
- Author:
- Jason van Zyl , Michal Maczka , Trygve Laugstøl
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractCompiler(CompilerOutputStyle compilerOutputStyle, String inputFileEnding, String outputFileEnding, String outputFile)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleancanUpdateTarget(CompilerConfiguration configuration)abstract StringgetCompilerId()CompilerOutputStylegetCompilerOutputStyle()StringgetInputFileEnding(CompilerConfiguration configuration)StringgetOutputFile(CompilerConfiguration configuration)StringgetOutputFileEnding(CompilerConfiguration configuration)static StringgetPathString(List<String> pathElements)protected static String[]getSourceFiles(CompilerConfiguration config)protected static Set<String>getSourceFilesForSourceRoot(CompilerConfiguration config, String sourceLocation)protected voidlogCompiling(String[] sourceFiles, CompilerConfiguration config)protected static StringmakeClassName(String fileName, String sourceDir)CompilerResultperformCompile(CompilerConfiguration configuration)Performs the compilation of the project.-
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.codehaus.plexus.compiler.Compiler
createCommandLine, supportsIncrementalCompilation
-
-
-
-
Constructor Detail
-
AbstractCompiler
protected AbstractCompiler(CompilerOutputStyle compilerOutputStyle, String inputFileEnding, String outputFileEnding, String outputFile)
-
-
Method Detail
-
getCompilerId
public abstract String getCompilerId()
-
performCompile
public CompilerResult performCompile(CompilerConfiguration configuration) throws CompilerException
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
public CompilerOutputStyle getCompilerOutputStyle()
- Specified by:
getCompilerOutputStylein interfaceCompiler
-
getInputFileEnding
public String getInputFileEnding(CompilerConfiguration configuration) throws CompilerException
- Specified by:
getInputFileEndingin interfaceCompiler- Throws:
CompilerException
-
getOutputFileEnding
public String getOutputFileEnding(CompilerConfiguration configuration) throws CompilerException
- Specified by:
getOutputFileEndingin interfaceCompiler- Throws:
CompilerException
-
getOutputFile
public String getOutputFile(CompilerConfiguration configuration) throws CompilerException
- Specified by:
getOutputFilein interfaceCompiler- Throws:
CompilerException
-
canUpdateTarget
public boolean canUpdateTarget(CompilerConfiguration configuration) throws CompilerException
- Specified by:
canUpdateTargetin interfaceCompiler- Throws:
CompilerException
-
getSourceFilesForSourceRoot
protected static Set<String> getSourceFilesForSourceRoot(CompilerConfiguration config, String sourceLocation)
-
getSourceFiles
protected static String[] getSourceFiles(CompilerConfiguration config)
-
makeClassName
protected static String makeClassName(String fileName, String sourceDir) throws CompilerException
- Throws:
CompilerException
-
logCompiling
protected void logCompiling(String[] sourceFiles, CompilerConfiguration config)
-
-