public class EnvironmentModule extends AbstractEnvironment
| Modifier and Type | Field and Description |
|---|---|
static String |
MODULE_NAME |
static String |
MODULE_PREFIX |
| Constructor and Description |
|---|
EnvironmentModule() |
| Modifier and Type | Method and Description |
|---|---|
Object |
execute(Object data)
Execute script code.
|
void |
exit(Object value)
Terminates script execution immediately.
|
IScriptEngine |
getScriptEngine()
Get the current script engine instance.
|
void |
help(String topic)
Open help page on addressed topic.
|
Object |
include(String filename)
Include and execute a script file.
|
void |
loadJar(Object location)
Add a jar file to the classpath.
|
void |
wrap(Object toBeWrapped)
Creates wrapper functions for a given java instance.
|
addModuleListener, getEnvironment, getModule, getModule, getModules, initialize, listModules, loadModule, print, removeModuleListenerpublic static final String MODULE_NAME
public static final String MODULE_PREFIX
public void wrap(Object toBeWrapped)
WrapToScript and creates wrapping code in
the target script language. A method named <instance>.myMethod() will be made available by calling myMethod().toBeWrapped - instance to be wrappedpublic final Object execute(Object data)
data - code to be interpretedpublic final void exit(@ScriptParameter(defaultValue="org.eclipse.ease.modules.ScriptParameter.null") Object value)
value - return codepublic final Object include(String filename)
filename - name of file to be includedThrowablepublic IScriptEngine getScriptEngine()
getScriptEngine in interface IEnvironmentgetScriptEngine in class AbstractScriptModuleIScriptEngine instancepublic void loadJar(Object location) throws MalformedURLException
location - URI, Path, File or IFileMalformedURLException - invalid URL detectedpublic void help(@ScriptParameter(defaultValue="org.eclipse.ease.modules.ScriptParameter.null") String topic)
topic - help topic to open (typically a function name)