org.apache.tools.ant.taskdefs.optional
Class Script
- Cloneable
Executes a script.
void | addText(String text) - Set the script text.
|
Path | createClasspath() - Classpath to be used when searching for classes and resources.
|
void | execute() - Run the script using the helper object.
|
void | setClasspath(Path classpath) - Set the classpath to be used when searching for classes and resources.
|
void | setClasspathRef(Reference r) - Set the classpath by reference.
|
void | setLanguage(String language) - Defines the language (required).
|
void | setManager(String manager) - Defines the manager.
|
void | setProject(Project project) - Set the project.
|
void | setSetBeans(boolean setBeans) - Set the setbeans attribute.
|
void | setSrc(String fileName) - Load the script from an external file ; optional.
|
bindToOwner , execute , getOwningTarget , getRuntimeConfigurableWrapper , getTaskName , getTaskType , getWrapper , handleErrorFlush , handleErrorOutput , handleFlush , handleInput , handleOutput , init , isInvalid , log , log , log , log , maybeConfigure , perform , reconfigure , setOwningTarget , setRuntimeConfigurableWrapper , setTaskName , setTaskType |
addText
public void addText(String text)
Set the script text.
text
- a component of the script text to be added.
createClasspath
public Path createClasspath()
Classpath to be used when searching for classes and resources.
- an empty Path instance to be configured by Ant.
setClasspath
public void setClasspath(Path classpath)
Set the classpath to be used when searching for classes and resources.
classpath
- an Ant Path object containing the search path.
setClasspathRef
public void setClasspathRef(Reference r)
Set the classpath by reference.
r
- a Reference to a Path instance to be used as the classpath
value.
setLanguage
public void setLanguage(String language)
Defines the language (required).
language
- the scripting language name for the script.
setManager
public void setManager(String manager)
Defines the manager.
manager
- the scripting manager.
setSetBeans
public void setSetBeans(boolean setBeans)
Set the setbeans attribute.
If this is true, <script> will create variables in the
script instance for all
properties, targets and references of the current project.
It this is false, only the project and self variables will
be set.
The default is true.
setBeans
- the value to set.
setSrc
public void setSrc(String fileName)
Load the script from an external file ; optional.
fileName
- the name of the file containing the script source.