Package org.codehaus.plexus.compiler
Class AbstractCompiler
- java.lang.Object
-
- org.codehaus.plexus.compiler.AbstractCompiler
-
- All Implemented Interfaces:
Compiler
public abstract class AbstractCompiler extends java.lang.Object implements Compiler
- Author:
- Jason van Zyl , Michal Maczka , Trygve Laugstøl
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractCompiler(CompilerOutputStyle compilerOutputStyle, java.lang.String inputFileEnding, java.lang.String outputFileEnding, java.lang.String outputFile)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleancanUpdateTarget(CompilerConfiguration configuration)abstract java.lang.StringgetCompilerId()CompilerOutputStylegetCompilerOutputStyle()java.lang.StringgetInputFileEnding(CompilerConfiguration configuration)protected org.slf4j.LoggergetLog()protected org.codehaus.plexus.logging.LoggergetLogger()Deprecated.please usegetLog()java.lang.StringgetOutputFile(CompilerConfiguration configuration)java.lang.StringgetOutputFileEnding(CompilerConfiguration configuration)static java.lang.StringgetPathString(java.util.List<java.lang.String> pathElements)protected static java.lang.String[]getSourceFiles(CompilerConfiguration config)protected static java.util.Set<java.lang.String>getSourceFilesForSourceRoot(CompilerConfiguration config, java.lang.String sourceLocation)protected voidlogCompiling(java.lang.String[] sourceFiles, CompilerConfiguration config)protected static java.lang.StringmakeClassName(java.lang.String fileName, java.lang.String sourceDir)CompilerResultperformCompile(CompilerConfiguration configuration)Performs the compilation of the project.-
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, 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 usegetLog()- Returns:
- a plexus Logger
-
getCompilerId
public abstract java.lang.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 java.lang.String getInputFileEnding(CompilerConfiguration configuration) throws CompilerException
- Specified by:
getInputFileEndingin interfaceCompiler- Throws:
CompilerException
-
getOutputFileEnding
public java.lang.String getOutputFileEnding(CompilerConfiguration configuration) throws CompilerException
- Specified by:
getOutputFileEndingin interfaceCompiler- Throws:
CompilerException
-
getOutputFile
public java.lang.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
-
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)
-
getSourceFiles
protected static java.lang.String[] getSourceFiles(CompilerConfiguration config)
-
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)
-
-