public abstract class ProcessorDef
extends org.apache.tools.ant.types.DataType
Modifier and Type | Field and Description |
---|---|
protected boolean |
newEnvironment |
Modifier | Constructor and Description |
---|---|
protected |
ProcessorDef()
Constructor
|
Modifier and Type | Method and Description |
---|---|
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 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.
|
org.apache.tools.ant.types.Environment |
getEnv()
Because linkers have multiples and none of them share the environment
settings here is a hack to give direct access to copy it just before
running
|
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.
|
boolean |
isNewEnvironment() |
void |
setClassname(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(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(String id)
Sets an id that can be used to reference this element.
|
void |
setIf(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(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
|
checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes, toString
protected ProcessorDef() throws NullPointerException
NullPointerException
protected static Boolean booleanValueOf(boolean val)
val
- boolean valueprotected void addConfiguredProcessorArg(CommandLineArgument arg) throws NullPointerException, org.apache.tools.ant.BuildException
arg
- command line argument, must not be nullNullPointerException
- if arg is nullorg.apache.tools.ant.BuildException
- if this definition is a referenceprotected void addConfiguredProcessorParam(ProcessorParam param) throws NullPointerException, org.apache.tools.ant.BuildException
param
- command line argument, must not be nullNullPointerException
- if arg is nullorg.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
processororg.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 nullpublic 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 consideredprotected final ProcessorDef[] getDefaultProviders(ProcessorDef baseDef)
baseDef
- corresponding ProcessorDef from CCTask, will be last element
in array unless inherit = falsepublic org.apache.tools.ant.types.Environment getEnv()
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 consideredpublic boolean hasFileSets()
public boolean isActive() throws org.apache.tools.ant.BuildException, IllegalStateException
IllegalStateException
- if not properly initializedorg.apache.tools.ant.BuildException
- if "if" or "unless" variable contains suspicious values
"false" or "no" which indicates possible confusionpublic void setClassname(String className) throws org.apache.tools.ant.BuildException
className
- full class nameorg.apache.tools.ant.BuildException
public void setDebug(boolean debug) throws org.apache.tools.ant.BuildException
debug
- true if targets should be built for debuggingorg.apache.tools.ant.BuildException
- if processor definition is a referencepublic void setDescription(String desc)
setDescription
in class org.apache.tools.ant.ProjectComponent
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(String id)
id
- idpublic void setIf(String propName)
propName
- name of propertypublic void setInherit(boolean inherit) throws org.apache.tools.ant.BuildException
inherit
- new valueorg.apache.tools.ant.BuildException
- if processor definition is a referencepublic void setLibtool(boolean libtool)
libtool
- If true, use libtool.public void setNewenvironment(boolean newenv)
public boolean isNewEnvironment()
protected void setProcessor(Processor processor) throws org.apache.tools.ant.BuildException, NullPointerException
processor
- processor, may not be null.org.apache.tools.ant.BuildException
- if ProcessorDef is a referenceNullPointerException
- 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(String propName)
propName
- name of propertypublic void visitFiles(FileVisitor visitor)
visitor
- object whose visit method is called for every fileCopyright © 2005-2016 NAR Maven Plugin developers. All Rights Reserved.