public class ScriptRunnerHelper
extends java.lang.Object
Constructor | Description |
---|---|
ScriptRunnerHelper() |
Modifier and Type | Method | 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.
|
boolean |
getCompiled() |
Get the compilation feature.
|
java.lang.String |
getEncoding() |
Get the external file encoding.
|
java.lang.String |
getLanguage() |
Get the language.
|
ScriptRunnerBase |
getScriptRunner() |
Create and set text on a script.
|
java.io.File |
getSrc() |
Get the external script file; optional.
|
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 |
setCompiled(boolean compiled) |
Enable the compilation of the script if possible.
|
void |
setEncoding(java.lang.String encoding) |
Set the encoding of the script from an external file; optional.
|
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 java.io.File getSrc()
public void setEncoding(java.lang.String encoding)
encoding
- the encoding of the file containing the script source.public java.lang.String getEncoding()
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 setCompiled(boolean compiled)
compiled
- the value to set.public boolean getCompiled()
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