net.sf.antcontrib.cpptasks.compiler
Class AbstractCompiler
java.lang.Object
|
+--net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
|
+--net.sf.antcontrib.cpptasks.compiler.AbstractCompiler
- Direct Known Subclasses:
- CommandLineCompiler
- public abstract class AbstractCompiler
- extends AbstractProcessor
- implements Compiler
An abstract compiler implementation.
- Author:
- Adam Murdoch, Curt Arnold
Constructor Summary |
protected |
AbstractCompiler(java.lang.String[] sourceExtensions,
java.lang.String[] headerExtensions,
java.lang.String outputSuffix)
|
Method Summary |
protected boolean |
canParse(java.io.File sourceFile)
Checks file name to see if parse should be attempted
Default implementation returns false for files with extensions
'.dll', 'tlb', '.res' |
protected abstract CompilerConfiguration |
createConfiguration(CCTask task,
LinkType linkType,
ProcessorDef[] baseConfigs,
CompilerDef specificConfig)
|
ProcessorConfiguration |
createConfiguration(CCTask task,
LinkType linkType,
ProcessorDef[] baseConfigs,
ProcessorDef specificConfig)
Returns the compiler configuration for or element. |
protected abstract Parser |
createParser()
|
protected java.lang.String |
getBaseOutputName(java.lang.String inputFile)
|
java.lang.String |
getOutputFileName(java.lang.String inputFile)
Output file name (no path components) corresponding to
source file |
DependencyInfo |
parseIncludes(CCTask task,
java.io.File source,
java.io.File[] includePath,
java.io.File[] sysIncludePath,
java.io.File[] envIncludePath,
java.io.File baseDir,
java.lang.String includePathIdentifier)
Returns dependency info for the specified source file |
protected boolean |
resolveInclude(java.lang.String includeName,
java.io.File[] includePath,
java.util.Vector onThisPath)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
AbstractCompiler
protected AbstractCompiler(java.lang.String[] sourceExtensions,
java.lang.String[] headerExtensions,
java.lang.String outputSuffix)
createConfiguration
protected abstract CompilerConfiguration createConfiguration(CCTask task,
LinkType linkType,
ProcessorDef[] baseConfigs,
CompilerDef specificConfig)
createConfiguration
public ProcessorConfiguration createConfiguration(CCTask task,
LinkType linkType,
ProcessorDef[] baseConfigs,
ProcessorDef specificConfig)
- Description copied from interface: Processor
- Returns the compiler configuration for or element.
- Tags copied from interface: Processor
- Parameters:
defaultProviders
- When specificConfig corresponds to a
or linker element, defaultProvider will be a zero to
two element array. If there is an extends attribute,
the first element will be the referenced ProcessorDef,
unless inherit = false, the last element will be the
containing elementspecificConfig
- A or element.- Returns:
- resulting configuration
getBaseOutputName
protected java.lang.String getBaseOutputName(java.lang.String inputFile)
getOutputFileName
public java.lang.String getOutputFileName(java.lang.String inputFile)
- Description copied from interface: Processor
- Output file name (no path components) corresponding to
source file
- Tags copied from interface: Processor
- Parameters:
inputFile
- input file- Returns:
- output file name or null if no output file or name
not determined by input file
canParse
protected boolean canParse(java.io.File sourceFile)
- Checks file name to see if parse should be attempted
Default implementation returns false for files with extensions
'.dll', 'tlb', '.res'
createParser
protected abstract Parser createParser()
parseIncludes
public final DependencyInfo parseIncludes(CCTask task,
java.io.File source,
java.io.File[] includePath,
java.io.File[] sysIncludePath,
java.io.File[] envIncludePath,
java.io.File baseDir,
java.lang.String includePathIdentifier)
- Returns dependency info for the specified source file
- Parameters:
task
- task for any diagnostic outputsource
- file to be parsedincludePath
- include path to be used to resolve included filessysIncludePath
- sysinclude path from build file, files resolved using
sysInclude path will not participate in dependency analysisenvIncludePath
- include path from environment variable, files
resolved with envIncludePath will not participate in dependency analysisbaseDir
- used to produce relative paths in DependencyInfoincludePathIdentifier
- used to distinguish DependencyInfo's
from different include path settings
resolveInclude
protected boolean resolveInclude(java.lang.String includeName,
java.io.File[] includePath,
java.util.Vector onThisPath)
Copyright © 2001-2002 Ant-Contrib project. All Rights Reserved.