Package net.sf.antcontrib.cpptasks.os390
Class OS390Linker
- java.lang.Object
-
- net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
-
- net.sf.antcontrib.cpptasks.compiler.AbstractLinker
-
- net.sf.antcontrib.cpptasks.compiler.CommandLineLinker
-
- net.sf.antcontrib.cpptasks.os390.OS390Linker
-
public final class OS390Linker extends CommandLineLinker
Adapter for the IBM (R) OS/390 (tm) Linker
-
-
Field Summary
Fields Modifier and Type Field Description private static OS390LinkerdatasetLinkerprivate static OS390LinkerdllLinkerprivate static OS390Linkerinstanceprivate booleanisADatasetLinker(package private) java.io.FileoutputFileprivate java.lang.StringoutputPrefix(package private) CCTasktask-
Fields inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
DEFAULT_DISCARD_BID, DEFAULT_PROCESS_BID
-
-
Constructor Summary
Constructors Modifier Constructor Description privateOS390Linker()privateOS390Linker(java.lang.String outputPrefix, java.lang.String outputSuffix)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddBase(long base, java.util.Vector args)protected voidaddEntry(java.lang.String entry, java.util.Vector args)protected voidaddFixed(java.lang.Boolean fixed, java.util.Vector args)protected voidaddImpliedArgs(boolean debug, LinkType linkType, java.util.Vector args)protected voidaddIncremental(boolean incremental, java.util.Vector args)private static intaddLibraryPatterns(java.lang.String[] libnames, java.lang.StringBuffer buf, java.lang.String prefix, java.lang.String extension, java.lang.String[] patterns, int offset)protected java.lang.String[]addLibrarySets(CCTask task, LibrarySet[] libsets, java.util.Vector preargs, java.util.Vector midargs, java.util.Vector endargs)protected voidaddMap(boolean map, java.util.Vector args)protected voidaddStack(int stack, java.util.Vector args)java.lang.StringgetCommandFileSwitch(java.lang.String commandFile)static OS390LinkergetDataSetInstance()static OS390LinkergetInstance()java.io.File[]getLibraryPath()returns the library path for the linkerjava.lang.String[]getLibraryPatterns(java.lang.String[] libnames, LibraryTypeEnum libType)Returns a set of filename patterns corresponding to library names.LinkergetLinker(LinkType linkType)Gets the linker for the specified link type.intgetMaximumCommandLength()java.lang.String[]getOutputFileNames(java.lang.String baseName, VersionInfo versionInfo)Output file name (no path components) corresponding to source filejava.lang.String[]getOutputFileSwitch(java.lang.String outputFile)protected java.lang.String[]getOutputFileSwitch(CCTask task, java.lang.String outputFile)booleanisCaseSensitive()Returns true if the linker is case-sensitivevoidlink(CCTask task, java.io.File outputFile, java.lang.String[] sourceFiles, CommandLineLinkerConfiguration config)Performs a link using a command line linkerprotected intrunCommand(CCTask task, java.io.File workingDir, java.lang.String[] cmdline)This method is exposed so test classes can overload and test the arguments without actually spawning the compiler-
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.CommandLineLinker
createConfiguration, decorateLinkerOption, getCommand, getIdentifier, getLibtoolLinker, getStartupObject, prepareArguments, prepareFilename, prepareResponseFile, quoteFilename, setCommand
-
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractLinker
addVersionFiles, bid, changeEnvironment, createConfiguration, getLibraryKey
-
Methods inherited from class net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
clone, getHeaderExtensions, getIdentifier, getOSArch, getOSName, getSourceExtensions, isDarwin, toString
-
-
-
-
Field Detail
-
datasetLinker
private static final OS390Linker datasetLinker
-
dllLinker
private static final OS390Linker dllLinker
-
instance
private static final OS390Linker instance
-
isADatasetLinker
private boolean isADatasetLinker
-
outputFile
java.io.File outputFile
-
outputPrefix
private java.lang.String outputPrefix
-
task
CCTask task
-
-
Method Detail
-
getDataSetInstance
public static OS390Linker getDataSetInstance()
-
getInstance
public static OS390Linker getInstance()
-
addBase
protected void addBase(long base, java.util.Vector args)- Specified by:
addBasein classCommandLineLinker
-
addFixed
protected void addFixed(java.lang.Boolean fixed, java.util.Vector args)- Specified by:
addFixedin classCommandLineLinker
-
addImpliedArgs
protected void addImpliedArgs(boolean debug, LinkType linkType, java.util.Vector args)- Specified by:
addImpliedArgsin classCommandLineLinker
-
addIncremental
protected void addIncremental(boolean incremental, java.util.Vector args)- Specified by:
addIncrementalin classCommandLineLinker
-
addLibrarySets
protected java.lang.String[] addLibrarySets(CCTask task, LibrarySet[] libsets, java.util.Vector preargs, java.util.Vector midargs, java.util.Vector endargs)
- Overrides:
addLibrarySetsin classCommandLineLinker
-
addMap
protected void addMap(boolean map, java.util.Vector args)- Specified by:
addMapin classCommandLineLinker
-
addStack
protected void addStack(int stack, java.util.Vector args)- Specified by:
addStackin classCommandLineLinker
-
addEntry
protected void addEntry(java.lang.String entry, java.util.Vector args)- Specified by:
addEntryin classCommandLineLinker
-
getCommandFileSwitch
public java.lang.String getCommandFileSwitch(java.lang.String commandFile)
- Specified by:
getCommandFileSwitchin classCommandLineLinker
-
getLibraryPath
public java.io.File[] getLibraryPath()
Description copied from interface:Linkerreturns the library path for the linker
-
getLibraryPatterns
public java.lang.String[] getLibraryPatterns(java.lang.String[] libnames, LibraryTypeEnum libType)Description copied from interface:LinkerReturns a set of filename patterns corresponding to library names. For example, "advapi32" would be expanded to "advapi32.dll" by DevStudioLinker and to "libadvapi32.a" and "libadvapi32.so" by GccLinker.- Parameters:
libnames- array of library names
-
addLibraryPatterns
private static int addLibraryPatterns(java.lang.String[] libnames, java.lang.StringBuffer buf, java.lang.String prefix, java.lang.String extension, java.lang.String[] patterns, int offset)
-
getLinker
public Linker getLinker(LinkType linkType)
Description copied from interface:LinkerGets the linker for the specified link type.- Returns:
- appropriate linker or null, will return this if this linker can handle the specified link type
-
getMaximumCommandLength
public int getMaximumCommandLength()
- Specified by:
getMaximumCommandLengthin classCommandLineLinker
-
getOutputFileNames
public java.lang.String[] getOutputFileNames(java.lang.String baseName, VersionInfo versionInfo)Description copied from interface:ProcessorOutput file name (no path components) corresponding to source file- Specified by:
getOutputFileNamesin interfaceProcessor- Overrides:
getOutputFileNamesin classCommandLineLinker- Parameters:
baseName- input file- Returns:
- output file name or null if no output file or name not determined by input file
-
getOutputFileSwitch
protected java.lang.String[] getOutputFileSwitch(CCTask task, java.lang.String outputFile)
- Overrides:
getOutputFileSwitchin classCommandLineLinker
-
getOutputFileSwitch
public java.lang.String[] getOutputFileSwitch(java.lang.String outputFile)
- Specified by:
getOutputFileSwitchin classCommandLineLinker
-
isCaseSensitive
public boolean isCaseSensitive()
Description copied from interface:LinkerReturns true if the linker is case-sensitive
-
link
public void link(CCTask task, java.io.File outputFile, java.lang.String[] sourceFiles, CommandLineLinkerConfiguration config) throws org.apache.tools.ant.BuildException
Description copied from class:CommandLineLinkerPerforms a link using a command line linker- Overrides:
linkin classCommandLineLinker- Throws:
org.apache.tools.ant.BuildException
-
runCommand
protected int runCommand(CCTask task, java.io.File workingDir, java.lang.String[] cmdline) throws org.apache.tools.ant.BuildException
Description copied from class:CommandLineLinkerThis method is exposed so test classes can overload and test the arguments without actually spawning the compiler- Overrides:
runCommandin classCommandLineLinker- Throws:
org.apache.tools.ant.BuildException
-
-