public class BshEvaluator extends Object implements StringEvaluator
Constructor and Description |
---|
BshEvaluator()
creates an Evaluator with its own interpreter.
|
BshEvaluator(bsh.Interpreter i)
creates an Evaluator that talks to the global namespace of the
Beanshell interpreter i.
|
BshEvaluator(bsh.Interpreter i,
bsh.NameSpace ns)
creates an Evaluator that talks to the namespace ns of the
Beanshell interpreter i.
|
Modifier and Type | Method and Description |
---|---|
String[] |
completeCommand(String part)
Given a partial script part, completeCommand returns an array
of possible completions.
|
InterpreterResult |
evaluate(String script)
The result of evaluating a string is another string together
with a boolean telling whether it is a regular result or an
error message.
|
bsh.Interpreter |
getInterpreter() |
bsh.util.NameCompletionTable |
getNameCompletion() |
public BshEvaluator()
public BshEvaluator(bsh.Interpreter i)
public BshEvaluator(bsh.Interpreter i, bsh.NameSpace ns)
public String[] completeCommand(String part)
StringEvaluator
completeCommand
in interface StringEvaluator
public InterpreterResult evaluate(String script)
StringEvaluator
evaluate
in interface StringEvaluator
public bsh.Interpreter getInterpreter()
public bsh.util.NameCompletionTable getNameCompletion()