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
public abstract class AbstractCompiler extends org.codehaus.plexus.logging.AbstractLogEnabled implements Compiler
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
AbstractCompiler.CompilerRunnable
private class
AbstractCompiler.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
compile(CompilerConfiguration config, java.io.File[] sourceFiles)
protected abstract org.codehaus.plexus.util.cli.Commandline
getCommandLine(java.io.File src, java.io.File dest, CompilerConfiguration config)
protected static java.io.File
getObjectFile(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.String
getObjectFileExtension(java.lang.String fileExtension)
return "obj" or "o" when file extension is not given based on current platformprotected abstract Parser
getParser()
-
-
-
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 compile(CompilerConfiguration config, java.io.File[] sourceFiles) throws NativeBuildException
- Specified by:
compile
in 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 NativeBuildException
Figure out the object file relative path from a given source file- Parameters:
sourceFile
-workingDirectory
-outputDirectory
-config
-- Returns:
- Throws:
NativeBuildException
-
-