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
-
Constructor Summary
Constructors Constructor Description AbstractCompiler()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description List
compile(CompilerConfiguration config, File[] sourceFiles)
protected abstract org.codehaus.plexus.util.cli.Commandline
getCommandLine(File src, File dest, CompilerConfiguration config)
protected static File
getObjectFile(File sourceFile, File outputDirectory, String objectFileExtension)
Figure out the object file relative path from a given source fileprotected static String
getObjectFileExtension(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(File src, File dest, CompilerConfiguration config) throws NativeBuildException
- Throws:
NativeBuildException
-
compile
public List compile(CompilerConfiguration config, File[] sourceFiles) throws NativeBuildException
- Specified by:
compile
in interfaceCompiler
- Returns:
- List of compiler ouput files (ie, .o, .obj )
- Throws:
NativeBuildException
-
getObjectFileExtension
protected static String getObjectFileExtension(String fileExtension)
return "obj" or "o" when file extension is not given based on current platform- Returns:
-
getObjectFile
protected static File getObjectFile(File sourceFile, File outputDirectory, String objectFileExtension) throws NativeBuildException
Figure out the object file relative path from a given source file- Parameters:
sourceFile
-workingDirectory
-outputDirectory
-config
-- Returns:
- Throws:
NativeBuildException
-
-