public class ScriptRunnerHelper
extends java.lang.Object
Constructor and Description |
---|
ScriptRunnerHelper() |
Modifier and Type | Method and Description |
---|---|
void |
add(ResourceCollection resource)
Add any source resource.
|
void |
addText(java.lang.String text)
Add script text.
|
Path |
createClasspath()
Classpath to be used when searching for classes and resources.
|
java.lang.String |
getLanguage()
Get the language.
|
ScriptRunnerBase |
getScriptRunner()
Create and set text on a script.
|
void |
setClassLoader(java.lang.ClassLoader loader)
Used when called by scriptdef.
|
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(java.lang.String language)
Defines the language (required).
|
void |
setManager(java.lang.String manager)
Defines the script manager - defaults to "auto".
|
void |
setProjectComponent(ProjectComponent component)
Set the project component associated with this helper.
|
void |
setSetBeans(boolean setBeans)
Set the setbeans attribute.
|
void |
setSrc(java.io.File file)
Load the script from an external file ; optional.
|
public void setProjectComponent(ProjectComponent component)
component
- the project component that owns this helper.public ScriptRunnerBase getScriptRunner()
public Path createClasspath()
public void setClasspath(Path classpath)
classpath
- an Ant Path object containing the search path.public void setClasspathRef(Reference r)
r
- a Reference to a Path instance to be used as the classpath
value.public void setSrc(java.io.File file)
file
- the file containing the script source.public void addText(java.lang.String text)
text
- a component of the script text to be added.public void setManager(java.lang.String manager)
manager
- the scripting manager - "bsf" or "javax" or "auto"public void setLanguage(java.lang.String language)
language
- the scripting language name for the script.public java.lang.String getLanguage()
public void setSetBeans(boolean setBeans)
setBeans
- the value to set.public void setClassLoader(java.lang.ClassLoader loader)
loader
- the loader used by scriptdef.public void add(ResourceCollection resource)
resource
- source of script