org.apache.tools.ant.taskdefs
Class MacroInstance
- DynamicAttribute, TaskContainer
public class MacroInstance
The class to be placed in the ant type definition.
It is given a pointer to the template definition,
and makes a copy of the unknown element, substituting
the parameter values in attributes and text.
- Ant 1.6
execute , getDescription , getLocation , getOwningTarget , getRuntimeConfigurableWrapper , getTaskName , getTaskType , getWrapper , handleErrorFlush , handleErrorOutput , handleFlush , handleInput , handleOutput , init , isInvalid , log , log , maybeConfigure , perform , reconfigure , setDescription , setLocation , setOwningTarget , setRuntimeConfigurableWrapper , setTaskName , setTaskType |
addTask
public void addTask(Task nestedTask)
Add a unknownElement for the macro instances nested elements.
- addTask in interface TaskContainer
nestedTask
- a nested element.
addText
public void addText(String text)
Set the text contents for the macro.
text
- the text to be added to the macro.
createDynamicElement
public Object createDynamicElement(String name)
throws BuildException
Method present for BC purposes.
name
- not used
- nothing
BuildException
- always
execute
public void execute()
Execute the templates instance.
Copies the unknown element, substitutes the attributes,
and calls perform on the unknown element.
- execute in interface Task
getMacroDef
public MacroDef getMacroDef()
- the macro definition object for this macro instance.
setDynamicAttribute
public void setDynamicAttribute(String name,
String value)
A parameter name value pair as a xml attribute.
- setDynamicAttribute in interface DynamicAttribute
name
- the name of the attributevalue
- the value of the attribute
setMacroDef
public void setMacroDef(MacroDef macroDef)
Called from MacroDef.MyAntTypeDefinition#create()
macroDef
- a MacroDef
value
Copyright B) 2000-2005 Apache Software Foundation. All Rights Reserved.