Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs.optional.script

public Class ScriptDefBase

extends Task
implements DynamicConfigurator
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.DynamicConfigurator, org.apache.tools.ant.DynamicElement, org.apache.tools.ant.DynamicAttribute
Imports
java.util.ArrayList, .HashMap, .List, .Map, org.apache.tools.ant.BuildException, .DynamicConfigurator, .MagicNames, .Task

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

Field Summary

Modifier and TypeField and Description
private Map<String, String>
attributes

Attributes

private Map<String, List<Object>>
nestedElementMap

Nested elements

private String
Inherited from org.apache.tools.ant.Task:
targettaskNametaskTypewrapper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
addText(String
a component of the script text to be added.
text
)

Set the script text.

public Object

Returns:

the element to be configured
createDynamicElement
(String
the nested element name
name
)

Implements org.apache.tools.ant.DynamicElement.createDynamicElement.

Create a nested element
public void
execute()

Overrides org.apache.tools.ant.Task.execute.

Locate the script defining task and execute the script by passing control to it
public void
fail(String
text to pass to the BuildException
message
)

Utility method for nested scripts; throws a BuildException with the given message.

private ScriptDef
public String

Returns:

text or null for no nested text
getText
()

get the text of this element; may be null

public void
setDynamicAttribute(String
the attribute name.
name
,
String
the attribute's string value
value
)

Implements org.apache.tools.ant.DynamicAttribute.setDynamicAttribute.

Set a task attribute
Inherited from org.apache.tools.ant.Task:
bindToOwnergetOwningTargetgetRuntimeConfigurableWrappergetTaskNamegetTaskTypegetWrapperhandleErrorFlushhandleErrorOutputhandleFlushhandleInputhandleOutputinitisInvalidloglogloglogmaybeConfigureperformreconfiguresetOwningTargetsetRuntimeConfigurableWrappersetTaskNamesetTaskType

Field Detail

attributesback to summary
private Map<String, String> attributes

Attributes

nestedElementMapback to summary
private Map<String, List<Object>> nestedElementMap

Nested elements

textback to summary
private String text

Constructor Detail

ScriptDefBaseback to summary
public ScriptDefBase()

Method Detail

addTextback to summary
public void addText(String text)

Set the script text.

Parameters
text:String

a component of the script text to be added.

Since
ant1.7
createDynamicElementback to summary
public Object createDynamicElement(String name)

Implements org.apache.tools.ant.DynamicElement.createDynamicElement.

Create a nested element

Parameters
name:String

the nested element name

Returns:Object

the element to be configured

Annotations
@Override
executeback to summary
public void execute()

Overrides org.apache.tools.ant.Task.execute.

Locate the script defining task and execute the script by passing control to it

Annotations
@Override
failback to summary
public void fail(String message)

Utility method for nested scripts; throws a BuildException with the given message.

Parameters
message:String

text to pass to the BuildException

Exceptions
BuildException:
always.
Since
ant1.7
getScriptback to summary
private ScriptDef getScript()
getTextback to summary
public String getText()

get the text of this element; may be null

Returns:String

text or null for no nested text

Since
ant1.7
setDynamicAttributeback to summary
public void setDynamicAttribute(String name, String value)

Implements org.apache.tools.ant.DynamicAttribute.setDynamicAttribute.

Set a task attribute

Parameters
name:String

the attribute name.

value:String

the attribute's string value

Annotations
@Override