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 protected
AbstractCompiler(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 boolean
canUpdateTarget(CompilerConfiguration configuration)
abstract java.lang.String
getCompilerId()
CompilerOutputStyle
getCompilerOutputStyle()
java.lang.String
getInputFileEnding(CompilerConfiguration configuration)
protected org.slf4j.Logger
getLog()
protected org.codehaus.plexus.logging.Logger
getLogger()
Deprecated.please usegetLog()
java.lang.String
getOutputFile(CompilerConfiguration configuration)
java.lang.String
getOutputFileEnding(CompilerConfiguration configuration)
static java.lang.String
getPathString(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 void
logCompiling(java.lang.String[] sourceFiles, CompilerConfiguration config)
protected static java.lang.String
makeClassName(java.lang.String fileName, java.lang.String sourceDir)
CompilerResult
performCompile(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:Compiler
Performs the compilation of the project. Clients must implement this method.- Specified by:
performCompile
in 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:
getCompilerOutputStyle
in interfaceCompiler
-
getInputFileEnding
public java.lang.String getInputFileEnding(CompilerConfiguration configuration) throws CompilerException
- Specified by:
getInputFileEnding
in interfaceCompiler
- Throws:
CompilerException
-
getOutputFileEnding
public java.lang.String getOutputFileEnding(CompilerConfiguration configuration) throws CompilerException
- Specified by:
getOutputFileEnding
in interfaceCompiler
- Throws:
CompilerException
-
getOutputFile
public java.lang.String getOutputFile(CompilerConfiguration configuration) throws CompilerException
- Specified by:
getOutputFile
in interfaceCompiler
- Throws:
CompilerException
-
canUpdateTarget
public boolean canUpdateTarget(CompilerConfiguration configuration) throws CompilerException
- Specified by:
canUpdateTarget
in 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)
-
-