Package org.apache.tools.ant.taskdefs
Class MacroInstance
- java.lang.Object
- 
- org.apache.tools.ant.ProjectComponent
- 
- org.apache.tools.ant.Task
- 
- org.apache.tools.ant.taskdefs.MacroInstance
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable,- DynamicAttribute,- TaskContainer
 
 public class MacroInstance extends Task implements DynamicAttribute, TaskContainer 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.- Since:
- Ant 1.6
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classMacroInstance.ElementEmbedded element in macro instance
 - 
Field Summary- 
Fields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
 
- 
 - 
Constructor SummaryConstructors Constructor Description MacroInstance()
 - 
Method SummaryModifier and Type Method Description voidaddTask(Task nestedTask)Add a unknownElement for the macro instances nested elements.voidaddText(java.lang.String text)Set the text contents for the macro.java.lang.ObjectcreateDynamicElement(java.lang.String name)Deprecated.since 1.6.x.voidexecute()Execute the templates instance.MacroDefgetMacroDef()voidsetDynamicAttribute(java.lang.String name, java.lang.String value)A parameter name value pair as a xml attribute.voidsetMacroDef(MacroDef macroDef)Called from MacroDef.MyAntTypeDefinition#create()- 
Methods inherited from class org.apache.tools.ant.TaskbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 - 
Methods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
- 
 
- 
- 
- 
Method Detail- 
setMacroDefpublic void setMacroDef(MacroDef macroDef) Called from MacroDef.MyAntTypeDefinition#create()- Parameters:
- macroDef- a- MacroDefvalue
 
 - 
getMacroDefpublic MacroDef getMacroDef() - Returns:
- the macro definition object for this macro instance.
 
 - 
setDynamicAttributepublic void setDynamicAttribute(java.lang.String name, java.lang.String value)A parameter name value pair as a xml attribute.- Specified by:
- setDynamicAttributein interface- DynamicAttribute
- Parameters:
- name- the name of the attribute
- value- the value of the attribute
 
 - 
createDynamicElement@Deprecated public java.lang.Object createDynamicElement(java.lang.String name) throws BuildExceptionDeprecated.since 1.6.x.Method present for BC purposes.- Parameters:
- name- not used
- Returns:
- nothing
- Throws:
- BuildException- always
 
 - 
addTaskpublic void addTask(Task nestedTask) Add a unknownElement for the macro instances nested elements.- Specified by:
- addTaskin interface- TaskContainer
- Parameters:
- nestedTask- a nested element.
 
 - 
addTextpublic void addText(java.lang.String text) Set the text contents for the macro.- Parameters:
- text- the text to be added to the macro.
 
 
- 
 
-