org.apache.tools.ant.taskdefs.optional.script

Class ScriptDefBase

public class ScriptDefBase extends Task implements DynamicConfigurator

The script execution class. This class finds the defining script task and passes control to that task's executeScript method.

Since: Ant 1.6

Method Summary
voidaddText(String text)
Set the script text.
ObjectcreateDynamicElement(String name)
Create a nested element
voidexecute()
Locate the script defining task and execute the script by passing control to it
voidfail(String message)
Utility method for nested scripts; throws a BuildException with the given message.
StringgetText()
get the text of this element; may be null
voidsetDynamicAttribute(String name, String value)
Set a task attribute

Method Detail

addText

public void addText(String text)
Set the script text.

Parameters: text a component of the script text to be added.

Since: ant1.7

createDynamicElement

public Object createDynamicElement(String name)
Create a nested element

Parameters: name the nested element name

Returns: the element to be configured

execute

public void execute()
Locate the script defining task and execute the script by passing control to it

fail

public void fail(String message)
Utility method for nested scripts; throws a BuildException with the given message.

Parameters: message text to pass to the BuildException

Throws: BuildException always.

Since: ant1.7

getText

public String getText()
get the text of this element; may be null

Returns: text or null for no nested text

Since: ant1.7

setDynamicAttribute

public void setDynamicAttribute(String name, String value)
Set a task attribute

Parameters: name the attribute name. value the attribute's string value