|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.types.DataType net.sf.antcontrib.cpptasks.ProcessorDef
public abstract class ProcessorDef
An abstract compiler/linker definition.
Field Summary | |
---|---|
protected boolean |
newEnvironment
|
Fields inherited from class org.apache.tools.ant.types.DataType |
---|
checked, description, ref |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
project |
Constructor Summary | |
---|---|
protected |
ProcessorDef()
Constructor |
Method Summary | |
---|---|
protected void |
addConfiguredProcessorArg(CommandLineArgument arg)
Adds a |
protected void |
addConfiguredProcessorParam(ProcessorParam param)
Adds a |
void |
addEnv(org.apache.tools.ant.types.Environment.Variable var)
Add an environment variable to the launched process. |
void |
addFileset(ConditionalFileSet srcSet)
Adds a source file set. |
protected static java.lang.Boolean |
booleanValueOf(boolean val)
Returns the equivalent Boolean object for the specified value Equivalent to Boolean.valueOf in JDK 1.4 |
ProcessorConfiguration |
createConfiguration(CCTask task,
LinkType linkType,
ProcessorDef baseDef,
TargetDef targetPlatform,
VersionInfo versionInfo)
Creates a configuration |
CommandLineArgument[] |
getActiveProcessorArgs()
Prepares list of processor arguments ( compilerarg, linkerarg ) that are active for the current project settings. |
ProcessorParam[] |
getActiveProcessorParams()
Prepares list of processor arguments ( compilerarg, linkerarg) that are active for the current project settings. |
boolean |
getDebug(ProcessorDef[] defaultProviders,
int index)
Gets boolean indicating debug build |
protected ProcessorDef[] |
getDefaultProviders(ProcessorDef baseDef)
Creates an chain of objects which provide default values in descending order of significance. |
ProcessorDef |
getExtends()
Gets the ProcessorDef specified by the extends attribute |
boolean |
getInherit()
Gets the inherit attribute. |
boolean |
getLibtool()
|
protected Processor |
getProcessor()
Obtains the appropriate processor (compiler, linker) |
protected Processor |
getProcessor(LinkType linkType)
Obtains the appropriate processor (compiler, linker) based on the LinkType. |
boolean |
getRebuild(ProcessorDef[] defaultProviders,
int index)
Gets a boolean value indicating whether all targets must be rebuilt regardless of dependency analysis. |
boolean |
hasFileSets()
Returns true if the processor definition contains embedded file set definitions |
boolean |
isActive()
Determine if this def should be used. |
void |
setClassname(java.lang.String className)
Sets the class name for the adapter. |
void |
setDebug(boolean debug)
If set true, all targets will be built for debugging. |
void |
setDescription(java.lang.String desc)
Sets a description of the current data type. |
void |
setExtends(org.apache.tools.ant.types.Reference extendsRef)
Specifies that this element extends the element with id attribute with a matching value. |
void |
setId(java.lang.String id)
Sets an id that can be used to reference this element. |
void |
setIf(java.lang.String propName)
Sets the property name for the 'if' condition. |
void |
setInherit(boolean inherit)
If inherit has the default value of true, defines, includes and other settings from the containing cc element will be inherited. |
void |
setLibtool(boolean libtool)
Set use of libtool. |
void |
setNewenvironment(boolean newenv)
Do not propagate old environment when new environment variables are specified. |
protected void |
setProcessor(Processor processor)
Sets the processor |
void |
setRebuild(boolean rebuild)
If set true, all targets will be unconditionally rebuilt. |
void |
setRefid(org.apache.tools.ant.types.Reference ref)
Specifies that this element should behave as if the content of the element with the matching id attribute was inserted at this location. |
void |
setUnless(java.lang.String propName)
Set the property name for the 'unless' condition. |
void |
visitFiles(FileVisitor visitor)
This method calls the FileVistor's visit function for every file in the processors definition |
Methods inherited from class org.apache.tools.ant.types.DataType |
---|
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, getCheckedRef, getDescription, getRefid, isChecked, isReference, noChildrenAllowed, setChecked, tooManyAttributes |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
getProject, log, log, setProject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean newEnvironment
Constructor Detail |
---|
protected ProcessorDef() throws java.lang.NullPointerException
java.lang.NullPointerException
Method Detail |
---|
protected static java.lang.Boolean booleanValueOf(boolean val)
val
- boolean value
protected void addConfiguredProcessorArg(CommandLineArgument arg) throws java.lang.NullPointerException, org.apache.tools.ant.BuildException
arg
- command line argument, must not be null
java.lang.NullPointerException
- if arg is null
org.apache.tools.ant.BuildException
- if this definition is a referenceprotected void addConfiguredProcessorParam(ProcessorParam param) throws java.lang.NullPointerException, org.apache.tools.ant.BuildException
param
- command line argument, must not be null
java.lang.NullPointerException
- if arg is null
org.apache.tools.ant.BuildException
- if this definition is a referencepublic void addEnv(org.apache.tools.ant.types.Environment.Variable var)
public void addFileset(ConditionalFileSet srcSet) throws org.apache.tools.ant.BuildException
srcSet
- Fileset identifying files that should be processed by this
processor
org.apache.tools.ant.BuildException
- if processor definition is a referencepublic ProcessorConfiguration createConfiguration(CCTask task, LinkType linkType, ProcessorDef baseDef, TargetDef targetPlatform, VersionInfo versionInfo)
baseDef
- reference to def from containing cc element, may be null
public CommandLineArgument[] getActiveProcessorArgs()
public ProcessorParam[] getActiveProcessorParams()
public boolean getDebug(ProcessorDef[] defaultProviders, int index)
defaultProviders
- array of ProcessorDef's in descending priorityindex
- index to first element in array that should be considered
protected final ProcessorDef[] getDefaultProviders(ProcessorDef baseDef)
baseDef
- corresponding ProcessorDef from CCTask, will be last element
in array unless inherit = false
public ProcessorDef getExtends() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
- if reference is not same type objectpublic final boolean getInherit()
public boolean getLibtool()
protected Processor getProcessor()
protected Processor getProcessor(LinkType linkType)
public boolean getRebuild(ProcessorDef[] defaultProviders, int index)
defaultProviders
- array of ProcessorDef's in descending priorityindex
- index to first element in array that should be considered
public boolean hasFileSets()
public boolean isActive() throws org.apache.tools.ant.BuildException, java.lang.IllegalStateException
java.lang.IllegalStateException
- if not properly initialized
org.apache.tools.ant.BuildException
- if "if" or "unless" variable contains suspicious values
"false" or "no" which indicates possible confusionpublic void setClassname(java.lang.String className) throws org.apache.tools.ant.BuildException
className
- full class name
org.apache.tools.ant.BuildException
public void setDebug(boolean debug) throws org.apache.tools.ant.BuildException
debug
- true if targets should be built for debugging
org.apache.tools.ant.BuildException
- if processor definition is a referencepublic void setDescription(java.lang.String desc)
setDescription
in class org.apache.tools.ant.types.DataType
public void setExtends(org.apache.tools.ant.types.Reference extendsRef) throws org.apache.tools.ant.BuildException
extendsRef
- Reference to the extended processor definition.
org.apache.tools.ant.BuildException
- if this processor definition is a referencepublic void setId(java.lang.String id)
id
- idpublic void setIf(java.lang.String propName)
propName
- name of propertypublic void setInherit(boolean inherit) throws org.apache.tools.ant.BuildException
inherit
- new value
org.apache.tools.ant.BuildException
- if processor definition is a referencepublic void setLibtool(boolean libtool)
libtool
- If true, use libtool.public void setNewenvironment(boolean newenv)
protected void setProcessor(Processor processor) throws org.apache.tools.ant.BuildException, java.lang.NullPointerException
processor
- processor, may not be null.
org.apache.tools.ant.BuildException
- if ProcessorDef is a reference
java.lang.NullPointerException
- if processor is nullpublic void setRebuild(boolean rebuild) throws org.apache.tools.ant.BuildException
rebuild
- if true, rebuild all targets.
org.apache.tools.ant.BuildException
- if processor definition is a referencepublic void setRefid(org.apache.tools.ant.types.Reference ref)
setRefid
in class org.apache.tools.ant.types.DataType
ref
- Reference to other elementpublic void setUnless(java.lang.String propName)
propName
- name of propertypublic void visitFiles(FileVisitor visitor)
visitor
- object whose visit method is called for every file
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |