本文整理了Java中bsh.Interpreter.setu()
方法的一些代码示例,展示了Interpreter.setu()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Interpreter.setu()
方法的具体详情如下:
包路径:bsh.Interpreter
类名称:Interpreter
方法名:setu
[英]Unchecked set for internal use
[中]未选中设置为内部使用
代码示例来源:origin: beanshell/beanshell
/**
Create an interpreter for evaluation only.
*/
public Interpreter()
{
this( new StringReader(""),
System.out, System.err, false, null );
evalOnly = true;
setu( "bsh.evalOnly", Primitive.TRUE );
}
代码示例来源:origin: jitlogic/zorka
/**
Create an interpreter for evaluation only.
*/
public Interpreter()
{
this( new StringReader(""),
System.out, System.err, false, null );
evalOnly = true;
setu( "bsh.evalOnly", new Primitive(true) );
}
代码示例来源:origin: beanshell/beanshell
private void initRootSystemObject()
{
BshClassManager bcm = getClassManager();
// bsh
setu("bsh", new NameSpace(null, bcm, "Bsh Object" ).getThis( this ) );
// bsh.system
setu( "bsh.system", SYSTEM_OBJECT);
setu( "bsh.shared", SYSTEM_OBJECT); // alias
// bsh.help
This helpText = new NameSpace(null, bcm, "Bsh Command Help Text" ).getThis( this );
setu( "bsh.help", helpText );
// bsh.cwd
setu( "bsh.cwd", System.getProperty("user.dir") );
// bsh.interactive
setu( "bsh.interactive", interactive ? Primitive.TRUE : Primitive.FALSE );
// bsh.evalOnly
setu( "bsh.evalOnly", Primitive.FALSE );
}
代码示例来源:origin: jitlogic/zorka
private void initRootSystemObject()
{
BshClassManager bcm = getClassManager();
// bsh
setu("bsh", new NameSpace( bcm, "Bsh Object" ).getThis( this ) );
setu( "bsh.system", SYSTEM_OBJECT);
setu( "bsh.shared", SYSTEM_OBJECT); // alias
// bsh.help
This helpText = new NameSpace(bcm, "Bsh Command Help Text" ).getThis( this );
setu( "bsh.help", helpText );
// bsh.cwd
try {
setu( "bsh.cwd", System.getProperty("user.dir") );
} catch ( SecurityException e ) {
// applets can't see sys props
setu( "bsh.cwd", "." );
}
// bsh.interactive
setu( "bsh.interactive", new Primitive(interactive) );
// bsh.evalOnly
setu( "bsh.evalOnly", new Primitive(evalOnly) );
}
代码示例来源:origin: beanshell/beanshell
/**
Attach a console
*/
public void setConsole( ConsoleAssignable console ) {
this.console = console;
this.parser = new Parser( getIn() );
setu( "bsh.console", console );
}
代码示例来源:origin: jitlogic/zorka
/**
Attach a console
Note: this method is incomplete.
*/
public void setConsole( ConsoleInterface console ) {
this.console = console;
setu( "bsh.console", console );
// redundant with constructor
setOut( console.getOut() );
setErr( console.getErr() );
// need to set the input stream - reinit the parser?
}
代码示例来源:origin: jitlogic/zorka
interpreter.setu( "bsh.args", bshArgs );
try {
Object result =
代码示例来源:origin: beanshell/beanshell
interpreter.setu( "bsh.args", bshArgs );
Object result =
interpreter.source( filename, interpreter.globalNameSpace );
代码示例来源:origin: beanshell/beanshell
if( ret != Primitive.VOID )
setu("$_", ret);
setu("$"+(++idx%10), ret);
if ( showResults )
println("--> $" + (idx%10) + " = " + StringUtil.typeValueString(ret));
if(!interactive)
EOF = true;
setu("$_e", e.getTarget());
代码示例来源:origin: jitlogic/zorka
setu("$_", ret);
if ( showResults )
println("<" + ret + ">");
if(!interactive)
eof = true;
setu("$_e", e.getTarget());
内容来源于网络,如有侵权,请联系作者删除!