Class AbstractCompiler
- java.lang.Object
-
- org.codehaus.plexus.logging.AbstractLogEnabled
-
- org.codehaus.mojo.natives.compiler.AbstractCompiler
-
- All Implemented Interfaces:
Compiler,org.codehaus.plexus.logging.LogEnabled
- Direct Known Subclasses:
AbstractCCompiler,AbstractGccCompiler
public abstract class AbstractCompiler extends org.codehaus.plexus.logging.AbstractLogEnabled implements Compiler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classAbstractCompiler.CompilerRunnableprivate classAbstractCompiler.CompilerThreadPoolExecutor
-
Constructor Summary
Constructors Constructor Description AbstractCompiler()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.util.List<java.io.File>compile(CompilerConfiguration config, java.io.File[] sourceFiles)protected abstract org.codehaus.plexus.util.cli.CommandlinegetCommandLine(java.io.File src, java.io.File dest, CompilerConfiguration config)protected static java.io.FilegetObjectFile(java.io.File sourceFile, java.io.File outputDirectory, java.lang.String objectFileExtension)Figure out the object file relative path from a given source fileprotected static java.lang.StringgetObjectFileExtension(java.lang.String fileExtension)return "obj" or "o" when file extension is not given based on current platformprotected abstract ParsergetParser()
-
-
-
Method Detail
-
getParser
protected abstract Parser getParser()
-
getCommandLine
protected abstract org.codehaus.plexus.util.cli.Commandline getCommandLine(java.io.File src, java.io.File dest, CompilerConfiguration config) throws NativeBuildException- Throws:
NativeBuildException
-
compile
public java.util.List<java.io.File> compile(CompilerConfiguration config, java.io.File[] sourceFiles) throws NativeBuildException
- Specified by:
compilein interfaceCompiler- Returns:
- List of compiler ouput files (ie, .o, .obj )
- Throws:
NativeBuildException
-
getObjectFileExtension
protected static java.lang.String getObjectFileExtension(java.lang.String fileExtension)
return "obj" or "o" when file extension is not given based on current platform- Returns:
-
getObjectFile
protected static java.io.File getObjectFile(java.io.File sourceFile, java.io.File outputDirectory, java.lang.String objectFileExtension) throws NativeBuildExceptionFigure out the object file relative path from a given source file- Parameters:
sourceFile-workingDirectory-outputDirectory-config-- Returns:
- Throws:
NativeBuildException
-
-