public class ScriptRunnerHelper extends Object
Constructor and Description |
---|
ScriptRunnerHelper() |
Modifier and Type | Method and Description |
---|---|
void |
add(ResourceCollection resource)
Add any source resource.
|
void |
addText(String text)
Add script text.
|
Path |
createClasspath()
Classpath to be used when searching for classes and resources.
|
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(String language)
Defines the language (required).
|
void |
setManager(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(File file)
Load the script from an external file ; optional.
|
public void add(ResourceCollection resource)
resource
- source of scriptpublic void addText(String text)
text
- a component of the script text to be added.public Path createClasspath()
public String getLanguage()
public ScriptRunnerBase getScriptRunner()
public void setClassLoader(java.lang.ClassLoader loader)
loader
- the loader used by scriptdef.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 setLanguage(String language)
language
- the scripting language name for the script.public void setManager(String manager)
manager
- the scripting manager - "bsf" or "javax" or "auto"public void setProjectComponent(ProjectComponent component)
component
- the project component that owns this helper.public void setSetBeans(boolean setBeans)
setBeans
- the value to set.public void setSrc(File file)
file
- the file containing the script source.