public class NativeEnvironment extends AbstractEnvironment implements IEnvironment
Constructor and Description |
---|
NativeEnvironment() |
Modifier and Type | Method and Description |
---|---|
Object |
wrap(Object toBeWrapped,
boolean useCustomNamespace)
Wrap a java instance.
|
addModuleListener, getEnvironment, getModule, getModule, getModules, initialize, listModules, loadModule, print, printError, readInput, removeModuleListener
getScriptEngine
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addModuleListener, getModule, getModule, getModules, getScriptEngine, loadModule, print, removeModuleListener
public Object wrap(Object toBeWrapped, boolean useCustomNamespace)
IEnvironment
WrapToScript
only these will be wrapped. If no annotation can be found, all public methods/constants will
be wrapped. As some target languages might not support method overloading this might result in some methods not wrapped correctly.wrap
in interface IEnvironment
toBeWrapped
- instance to be wrappeduseCustomNamespace
- set to true
if functions and constants should not be stored to the global namespace but to the return value only