net.sf.antcontrib.cpptasks.compiler

Class AbstractProcessor

public abstract class AbstractProcessor extends Object implements Processor, Cloneable

An abstract processor (compiler/linker) implementation.

Author: Curt Arnold

Field Summary
static intDEFAULT_DISCARD_BID
default bid for a file name that the processor recognizes but does not process and does not want to fall through to the linker
static intDEFAULT_PROCESS_BID
default bid for a file name that the processor desires to process
Constructor Summary
protected AbstractProcessor(String[] sourceExtensions, String[] headerExtensions)
Method Summary
intbid(String inputFile)
Returns the bid of the processor for the file.
ProcessorchangeEnvironment(boolean newEnvironment, Environment env)
protected Objectclone()
String[]getHeaderExtensions()
protected static StringgetIdentifier(String[] command, String fallback)
Determines the identification of a command line processor by capture the first line of its output for a specific command.
abstract StringgetIdentifier()
protected StringgetOSArch()
Gets the target operating system architecture
protected StringgetOSName()
Gets the target operating system name
String[]getSourceExtensions()
protected booleanisDarwin()
Returns true if the target operating system is Mac OS X or Darwin.
StringtoString()

Field Detail

DEFAULT_DISCARD_BID

public static final int DEFAULT_DISCARD_BID
default bid for a file name that the processor recognizes but does not process and does not want to fall through to the linker

DEFAULT_PROCESS_BID

public static final int DEFAULT_PROCESS_BID
default bid for a file name that the processor desires to process

Constructor Detail

AbstractProcessor

protected AbstractProcessor(String[] sourceExtensions, String[] headerExtensions)

Method Detail

bid

public int bid(String inputFile)
Returns the bid of the processor for the file.

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, Environment env)

clone

protected Object clone()

getHeaderExtensions

public String[] getHeaderExtensions()

getIdentifier

protected static String getIdentifier(String[] command, 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

getIdentifier

public abstract String getIdentifier()

getOSArch

protected String getOSArch()
Gets the target operating system architecture

Returns: String target operating system architecture

getOSName

protected String getOSName()
Gets the target operating system name

Returns: String target operating system name

getSourceExtensions

public String[] getSourceExtensions()

isDarwin

protected boolean isDarwin()
Returns true if the target operating system is Mac OS X or Darwin.

Returns: boolean

toString

public final String toString()
Copyright ? 2001-2011 Ant-Contrib project. All Rights Reserved.