本文整理了Java中bsh.Interpreter.initRootSystemObject()
方法的一些代码示例,展示了Interpreter.initRootSystemObject()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Interpreter.initRootSystemObject()
方法的具体详情如下:
包路径:bsh.Interpreter
类名称:Interpreter
方法名:initRootSystemObject
暂无
代码示例来源:origin: beanshell/beanshell
/**
Set the global namespace for this interpreter.
<p>
Note: This is here for completeness. If you're using this a lot
it may be an indication that you are doing more work than you have
to. For example, caching the interpreter instance rather than the
namespace should not add a significant overhead. No state other
than the debug status is stored in the interpreter.
<p>
All features of the namespace can also be accessed using the
interpreter via eval() and the script variable 'this.namespace'
(or global.namespace as necessary).
*/
public void setNameSpace( NameSpace globalNameSpace ) {
this.globalNameSpace = globalNameSpace;
if ( null != globalNameSpace ) try {
if ( ! (globalNameSpace.getVariable("bsh") instanceof This) ) {
initRootSystemObject();
if ( interactive )
loadRCFiles();
}
} catch (final UtilEvalError e) {
throw new IllegalStateException(e);
}
}
代码示例来源:origin: jitlogic/zorka
if ( namespace == null ) {
globalNameSpace = new NameSpace( bcm, "global");
initRootSystemObject();
} else {
globalNameSpace = namespace;
try {
if ( ! (globalNameSpace.getVariable("bsh") instanceof This)) {
initRootSystemObject();
内容来源于网络,如有侵权,请联系作者删除!