| Package | Description |
|---|---|
| bsh | |
| bsh.security |
| Modifier and Type | Class and Description |
|---|---|
class |
EvalException
EvalException indicates that the script has encountered a
runtime exception and the current node cannot be successfully
evaluated.
|
class |
ParseException
This exception is thrown when parse errors are encountered.
|
class |
TargetError
TargetError is an EvalError that wraps an exception thrown by the script
(or by code called from the script).
|
| Modifier and Type | Method and Description |
|---|---|
EvalError |
RuntimeEvalError.getEvalError()
The script error, with its line, file and script stack.
|
EvalError |
EvalError.reThrow(java.lang.String msg)
Return the error to re-throw, prepending the specified message.
|
EvalError |
UtilEvalError.toEvalError(Node node,
CallStack callstack) |
EvalError |
UtilEvalError.toEvalError(java.lang.String msg,
Node node,
CallStack callstack)
Re-throw as an eval error, prefixing msg to the message and specifying
the node.
|
EvalError |
UtilTargetError.toEvalError(java.lang.String msg,
Node node,
CallStack callstack)
Override toEvalError to throw TargetError type.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
BSHPackageDeclaration.eval(CallStack callstack,
Interpreter interpreter) |
java.lang.Object |
BSHTryWithResources.eval(CallStack callstack,
Interpreter interpreter) |
java.lang.Object |
SimpleNode.eval(CallStack callstack,
Interpreter interpreter)
This is the general signature for evaluation of a node.
|
java.lang.Object |
BSHAutoCloseable.eval(CallStack callstack,
Interpreter interpreter) |
java.lang.Object |
BSHLabeledStatement.eval(CallStack callstack,
Interpreter interpreter) |
java.lang.Object |
BSHEnumConstant.eval(CallStack callstack,
Interpreter interpreter) |
java.lang.Object |
BSHMultiCatch.eval(CallStack callstack,
Interpreter interpreter)
Evaluate the types.
|
java.lang.Object |
Node.eval(CallStack callstack,
Interpreter interpreter)
This is the general signature for evaluation of a node.
|
java.lang.Object |
BSHLiteral.eval(CallStack callstack,
Interpreter interpreter) |
java.lang.Object |
Interpreter.eval(java.io.Reader in)
Evaluate the inputstream in this interpreter's global namespace.
|
java.lang.Object |
Interpreter.eval(java.io.Reader in,
NameSpace nameSpace,
java.lang.String sourceFileInfo)
Spawn a non-interactive local interpreter to evaluate text in the
specified namespace.
|
java.lang.Object |
Interpreter.eval(java.lang.String statements)
Evaluate the string in this interpreter's global namespace.
|
java.lang.Object |
Interpreter.eval(java.lang.String statements,
NameSpace nameSpace)
Evaluate the string in the specified namespace.
|
java.lang.Class<?> |
ClassGenerator.generateClass(java.lang.String name,
Modifiers modifiers,
java.lang.Class<?>[] interfaces,
java.lang.Class<?> superClass,
bsh.BSHBlock block,
bsh.ClassGenerator.Type type,
CallStack callstack,
Interpreter interpreter)
Parse the BSHBlock for the class definition and generate the class.
|
static java.lang.Class<?> |
ClassGenerator.generateClassImpl(java.lang.String name,
Modifiers modifiers,
java.lang.Class<?>[] interfaces,
java.lang.Class<?> superClass,
bsh.BSHBlock block,
bsh.ClassGenerator.Type type,
CallStack callstack,
Interpreter interpreter)
Parse the BSHBlock for for the class definition and generate the class
using ClassGenerator.
|
java.lang.Object |
Interpreter.get(java.lang.String name)
Get the value of the name.
|
java.lang.Object[] |
BSHEnumConstant.getArguments(CallStack callstack,
Interpreter interpreter) |
java.lang.Object |
Interpreter.getInterface(java.lang.Class<?> interf)
Get a reference to the interpreter (global namespace), cast
to the specified interface type.
|
boolean |
BSHEnumConstant.hasArguments(CallStack callstack,
Interpreter interpreter) |
java.lang.Object |
PreparsedScript.invoke(java.util.Map<java.lang.String,?> context)
Invoke the prepared script with the supplied arguments exposed.
|
java.lang.Object |
BshMethod.invoke(java.lang.Object[] argValues,
Interpreter interpreter)
Invoke the declared method with the specified arguments and interpreter
reference.
|
java.lang.Object |
BshMethod.invoke(java.lang.Object[] argValues,
Interpreter interpreter,
CallStack callstack,
Node callerInfo)
Invoke the bsh method with the specified args, interpreter ref,
and callstack.
|
protected java.lang.Object |
NameSpace.invokeCommand(java.lang.String commandName,
java.lang.Object[] args,
Interpreter interpreter,
CallStack callstack,
Node callerInfo)
Invoke an imported command scoped by namespace hierarchy.
|
protected java.lang.Object |
NameSpace.invokeCommand(java.lang.String commandName,
java.lang.Object[] args,
Interpreter interpreter,
CallStack callstack,
Node callerInfo,
boolean ignoreInvoke)
Invoke an imported command scoped by namespace hierarchy.
|
protected java.lang.Object |
NameSpace.invokeDefaultInvokeMethod(java.lang.String commandName,
java.lang.Object[] args,
Interpreter interpreter,
CallStack callstack,
Node callerInfo,
boolean[] outHasMethod)
Invoke the default invoke method if found in the namespace,
Updates the outHasMethod array index 0 by reference, if false then method was
not found and the return result is meaningless.
|
java.lang.Object |
This.invokeMethod(java.lang.String methodName,
java.lang.Class<?>[] paramTypes,
java.lang.Object[] args,
boolean declaredOnly)
Class generated method stub entry that selects the scripted method
by the stub's own parameter types rather than the argument values.
|
java.lang.Object |
This.invokeMethod(java.lang.String name,
java.lang.Object[] args)
Invoke specified method as from outside java code, using the
declaring interpreter and current namespace.
|
java.lang.Object |
This.invokeMethod(java.lang.String methodName,
java.lang.Object[] args,
boolean declaredOnly)
Simplified method for class generated method stubs.
|
java.lang.Object |
NameSpace.invokeMethod(java.lang.String methodName,
java.lang.Object[] args,
Interpreter interpreter)
Invoke a method in this namespace with the specified args and
interpreter reference.
|
java.lang.Object |
NameSpace.invokeMethod(java.lang.String methodName,
java.lang.Object[] args,
Interpreter interpreter,
CallStack callstack,
Node callerInfo)
This method simply delegates to This.invokeMethod();.
|
java.lang.Object |
This.invokeMethod(java.lang.String methodName,
java.lang.Object[] args,
Interpreter interpreter,
CallStack callstack,
Node callerInfo,
boolean declaredOnly)
Invoke a method in this namespace with the specified args,
interpreter reference, callstack, and caller info.
|
static java.lang.Object |
Reflect.invokeObjectMethod(java.lang.Object object,
java.lang.String methodName,
java.lang.Object[] args,
Interpreter interpreter,
CallStack callstack,
Node callerInfo)
Invoke method on arbitrary object instance.
|
void |
Interpreter.set(java.lang.String name,
boolean value) |
void |
Interpreter.set(java.lang.String name,
double value) |
void |
Interpreter.set(java.lang.String name,
float value) |
void |
Interpreter.set(java.lang.String name,
int value) |
void |
Interpreter.set(java.lang.String name,
long value) |
void |
Interpreter.set(java.lang.String name,
java.lang.Object value)
Assign the value to the name.
|
java.lang.Object |
Interpreter.source(java.io.File file)
Source a script from a file for interpretation.
|
java.lang.Object |
Interpreter.source(java.io.File file,
NameSpace namespace)
Source a script from a file for interpretation.
|
java.lang.Object |
Interpreter.source(java.lang.String filename)
Source a script from a filename for interpretation.
|
java.lang.Object |
Interpreter.source(java.lang.String filename,
NameSpace namespace)
Source a script from a filename for interpretation.
|
java.lang.Object |
Interpreter.source(java.net.URL url)
Source a script from a url for interpretation.
|
java.lang.Object |
Interpreter.source(java.net.URL url,
NameSpace namespace)
Source a script from a url for interpretation.
|
void |
Interpreter.unset(java.lang.String name)
Unassign the variable name.
|
| Constructor and Description |
|---|
PreparsedScript(java.lang.String source)
Constructor without a supplied class loader.
|
PreparsedScript(java.lang.String source,
java.lang.ClassLoader classLoader)
Instance of a prepared script for the supplied source and class loader.
|
| Modifier and Type | Method and Description |
|---|---|
EvalError |
SecurityError.toEvalError(Node node,
CallStack callstack) |
EvalError |
SecurityError.toEvalError(java.lang.String msg,
Node node,
CallStack callstack) |