Class AbstractLinker
java.lang.Object
net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
net.sf.antcontrib.cpptasks.compiler.AbstractLinker
- Direct Known Subclasses:
CommandLineLinker
An abstract Linker implementation.
- Author:
- Adam Murdoch
-
Field Summary
Fields inherited from class AbstractProcessor
DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddVersionFiles(VersionInfo versionInfo, LinkType linkType, File outputFile, boolean isDebug, File objDir, TargetMatcher matcher) Adds source or object files to the bidded fileset to support version information.intReturns the bid of the processor for the file.changeEnvironment(boolean newEnvironment, org.apache.tools.ant.types.Environment env) protected abstract LinkerConfigurationcreateConfiguration(CCTask task, LinkType linkType, ProcessorDef[] baseConfigs, LinkerDef specificConfig, TargetDef targetPlatform, VersionInfo versionInfo) createConfiguration(CCTask task, LinkType linkType, ProcessorDef[] baseConfigs, ProcessorDef specificConfig, TargetDef targetPlatform, VersionInfo versionInfo) Returns the compiler configuration foror element. getLibraryKey(File libfile) Extracts the significant part of a library name to ensure there aren't collisionsabstract String[]getOutputFileNames(String fileName, VersionInfo versionInfo) Output file name (no path components) corresponding to source fileMethods inherited from class AbstractProcessor
clone, getHeaderExtensions, getIdentifier, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, toStringMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Linker
getLibraryPath, getLibraryPatterns, getLinker, isCaseSensitiveMethods inherited from interface Processor
getIdentifier
-
Constructor Details
-
AbstractLinker
-
-
Method Details
-
bid
Returns the bid of the processor for the file. A linker will bid 1 on any unrecognized file type.- Specified by:
bidin interfaceProcessor- Overrides:
bidin classAbstractProcessor- Parameters:
inputFile- filename of input file- Returns:
- bid for the file, 0 indicates no interest, 1 indicates that the processor recognizes the file but doesn't process it (header files, for example), 100 indicates strong interest
-
changeEnvironment
public Processor changeEnvironment(boolean newEnvironment, org.apache.tools.ant.types.Environment env) - Specified by:
changeEnvironmentin interfaceProcessor- Overrides:
changeEnvironmentin classAbstractProcessor
-
createConfiguration
protected abstract LinkerConfiguration createConfiguration(CCTask task, LinkType linkType, ProcessorDef[] baseConfigs, LinkerDef specificConfig, TargetDef targetPlatform, VersionInfo versionInfo) -
createConfiguration
public ProcessorConfiguration createConfiguration(CCTask task, LinkType linkType, ProcessorDef[] baseConfigs, ProcessorDef specificConfig, TargetDef targetPlatform, VersionInfo versionInfo) Description copied from interface:ProcessorReturns the compiler configuration foror element. - Specified by:
createConfigurationin interfaceProcessor- Parameters:
baseConfigs- When specificConfig corresponds to aor 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 element specificConfig- Aor element. - Returns:
- resulting configuration
-
getLibraryKey
Description copied from interface:LinkerExtracts the significant part of a library name to ensure there aren't collisions- Specified by:
getLibraryKeyin interfaceLinker
-
getOutputFileNames
Description copied from interface:ProcessorOutput file name (no path components) corresponding to source file- Specified by:
getOutputFileNamesin interfaceProcessor- Parameters:
fileName- input file- Returns:
- output file name or null if no output file or name not determined by input file
-
addVersionFiles
public void addVersionFiles(VersionInfo versionInfo, LinkType linkType, File outputFile, boolean isDebug, File objDir, TargetMatcher matcher) throws IOException Adds source or object files to the bidded fileset to support version information.- Specified by:
addVersionFilesin interfaceLinker- Parameters:
versionInfo- version informationlinkType- link typeoutputFile- name of generated executableisDebug- true if debug buildobjDir- directory for generated filesmatcher- bidded fileset- Throws:
IOException
-