net.sf.antcontrib.cpptasks.compiler
Class AbstractProcessor
java.lang.Object
|
+--net.sf.antcontrib.cpptasks.compiler.AbstractProcessor
- Direct Known Subclasses:
- AbstractCompiler, AbstractLinker
- public abstract class AbstractProcessor
- extends java.lang.Object
- implements Processor
An abstract processor (compiler/linker) implementation.
- Author:
- Curt Arnold
Constructor Summary |
protected |
AbstractProcessor(java.lang.String[] sourceExtensions,
java.lang.String[] headerExtensions)
|
Method Summary |
int |
bid(java.lang.String inputFile)
Returns the bid of the processor for the file. |
abstract java.lang.String |
getIdentifier()
Retrieve an identifier that identifies the specific version
of the compiler. |
protected static java.lang.String |
getIdentifier(java.lang.String[] command,
java.lang.String fallback)
Determines the identification of a command line processor by
capture the first line of its output for a specific command. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
AbstractProcessor
protected AbstractProcessor(java.lang.String[] sourceExtensions,
java.lang.String[] headerExtensions)
getIdentifier
public abstract java.lang.String getIdentifier()
- Description copied from interface: Processor
- Retrieve an identifier that identifies the specific version
of the compiler. Compilers with the same identifier should
produce the same output files for the same input files and
command line switches.
- Specified by:
- getIdentifier in interface Processor
toString
public final java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
bid
public int bid(java.lang.String inputFile)
- Returns the bid of the processor for the file.
- Specified by:
- bid in interface Processor
- 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
getIdentifier
protected static java.lang.String getIdentifier(java.lang.String[] command,
java.lang.String fallback)
- Determines the identification of a command line processor by
capture the first line of its output for a specific command.
- Parameters:
command
- array of command line arguments starting with
executable name. For example, { "cl" }fallback
- start of identifier if there is an error in executing
the command- Returns:
- identifier for the processor
Copyright © 2001-2002 Ant-Contrib project. All Rights Reserved.