| Package | Description |
|---|---|
| bsh | |
| bsh.commands | |
| bsh.engine |
| Modifier and Type | Method and Description |
|---|---|
Interpreter |
Interpreter.getParent()
Get the parent Interpreter of this interpreter, if any.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
This.bind(This ths,
NameSpace namespace,
Interpreter declaringInterpreter)
Bind a This reference to a parent's namespace with the specified
declaring interpreter.
|
static BshClassManager |
BshClassManager.createClassManager(Interpreter interpreter)
Create a new instance of the class manager.
|
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.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 |
NameSpace.get(java.lang.String name,
Interpreter interpreter)
Resolve name to an object through this namespace.
|
java.lang.Object[] |
BSHEnumConstant.getArguments(CallStack callstack,
Interpreter interpreter) |
java.lang.Object |
NameSpace.getCommand(java.lang.String name,
java.lang.Class<?>[] argTypes,
Interpreter interpreter)
A command is a scripted method or compiled command class implementing a
specified method signature.
|
This |
NameSpace.getGlobal(Interpreter declaringInterpreter)
Get the top level namespace or this namespace if we are the top.
|
This |
NameSpace.getSuper(Interpreter declaringInterpreter)
Get the parent namespace' This reference or this namespace' This
reference if we are the top.
|
This |
NameSpace.getThis(Interpreter declaringInterpreter)
A This object is a thin layer over a namespace, comprising a bsh object
context.
|
java.lang.Object |
NameSpace.getVariableOrProperty(java.lang.String name,
Interpreter interp)
Get the specified variable or property in this namespace or a parent
namespace.
|
boolean |
BSHEnumConstant.hasArguments(CallStack callstack,
Interpreter interpreter) |
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.
|
static java.lang.Object |
Reflect.invokeCompiledCommand(java.lang.Class<?> commandClass,
java.lang.Object[] args,
Interpreter interpreter,
CallStack callstack,
Node callerInfo)
A command may be implemented as a compiled Java class containing one or
more static invoke() methods of the correct signature.
|
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 |
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.
|
| Constructor and Description |
|---|
Interpreter(ConsoleAssignable console,
boolean interactive,
NameSpace namespace,
Interpreter parent,
java.lang.String sourceFileInfo)
The main constructor, all other constructors should pass through here.
|
Interpreter(ConsoleInterface console,
Interpreter parent)
An interactive interpreter attached to a console using parent namesepace.
|
Interpreter(ConsoleInterface console,
NameSpace namespace,
Interpreter parent)
An interactive interpreter attached to the specified console.
|
Interpreter(Interpreter parent)
Extend existing interpreter.
|
Interpreter(NameSpace namespace,
Interpreter parent)
A non interactive interpreter for namespace and parent.
|
Interpreter(NameSpace namespace,
Interpreter parent,
java.lang.String sourceFileInfo)
A non interactive interpreter for namespace, parent and source file.
|
Interpreter(java.io.Reader in,
java.io.PrintStream out,
java.io.PrintStream err,
boolean interactive,
NameSpace namespace,
Interpreter parent,
java.lang.String sourceFileInfo)
Wraps individual input output streams as a console collection.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
dir.invoke(Interpreter env,
CallStack callstack)
Implement dir() command.
|
static void |
dir.invoke(Interpreter env,
CallStack callstack,
java.lang.String dir)
Implement dir( String directory ) command.
|
| Modifier and Type | Method and Description |
|---|---|
protected Interpreter |
BshScriptEngine.getInterpreter() |