The script execution class. This class finds the defining script task
and passes control to that task's executeScript method.
| Method from org.apache.tools.ant.taskdefs.optional.script.ScriptDefBase Detail: |
public void addText(String text) {
this.text = getProject().replaceProperties(text);
}
|
public Object createDynamicElement(String name) {
List nestedElementList = (List) nestedElementMap.get(name);
if (nestedElementList == null) {
nestedElementList = new ArrayList();
nestedElementMap.put(name, nestedElementList);
}
Object element = getScript().createNestedElement(name);
nestedElementList.add(element);
return element;
}
|
public void execute() {
getScript().executeScript(attributes, nestedElementMap, this);
}
Locate the script defining task and execute the script by passing
control to it |
public void fail(String message) {
throw new BuildException(message);
}
Utility method for nested scripts; throws a BuildException
with the given message. |
public String getText() {
return text;
}
get the text of this element; may be null |
public void setDynamicAttribute(String name,
String value) {
ScriptDef definition = getScript();
if (!definition.isAttributeSupported(name)) {
throw new BuildException("< " + getTaskType()
+ " > does not support the \"" + name + "\" attribute");
}
attributes.put(name, value);
}
|