org.apache.tools.ant.taskdefs.optional.script
public class ScriptDef extends DefBase
Since: Ant 1.6
Nested Class Summary | |
---|---|
static class | ScriptDef.Attribute
Class representing an attribute definition |
static class | ScriptDef.NestedElement
Class to represent a nested element definition |
Method Summary | |
---|---|
void | add(ResourceCollection resource)
Add any source resource. |
void | addAttribute(ScriptDef.Attribute attribute)
Add an attribute definition to this script.
|
void | addElement(ScriptDef.NestedElement nestedElement)
Add a nested element definition.
|
void | addText(String text)
Set the script text.
|
Object | createNestedElement(String elementName)
Create a nested element to be configured.
|
void | execute()
Define the script. |
void | executeScript(Map attributes, Map elements)
Execute the script.
|
void | executeScript(Map attributes, Map elements, ScriptDefBase instance)
Execute the script.
|
boolean | isAttributeSupported(String attributeName)
Indicates whether the task supports a given attribute name
|
void | setLanguage(String language)
Defines the language (required).
|
void | setManager(String manager)
Defines the manager.
|
void | setName(String name)
set the name under which this script will be activated in a build
file
|
void | setProject(Project project)
Set the project. |
void | setSrc(File file)
Load the script from an external file ; optional.
|
Parameters: resource source of script
Since: Ant1.7.1
Parameters: attribute the attribute definition.
Parameters: nestedElement the nested element definition.
Parameters: text a component of the script text to be added.
Parameters: elementName the name of the nested element.
Returns: object representing the element name.
Deprecated: since 1.7. Use executeScript(attribute, elements, instance) instead.
Execute the script.Parameters: attributes collection of attributes elements a list of nested element values.
Parameters: attributes collection of attributes elements a list of nested element values. instance the script instance; can be null
Parameters: attributeName the name of the attribute.
Returns: true if the attribute is supported by the script.
Parameters: language the scripting language name for the script.
Parameters: manager the scripting manager.
Parameters: name the name of the script
Parameters: project the project that this def belows to.
Parameters: file the file containing the script source.