BBjInterpreter
Description
In BBj 25.03 and higher it returns a BBjInterpreter object that provides access to selected BBj interpreter functionality through a Java API. This method allows Java code to invoke interpreter-level operations such as executing BBj commands, calling BBj programs, and managing interpreter behavior without direct access to the BBj language.
Creation
Obtain a BBjInterpreter object through the following BBjAPI object method:
|
Return Value |
Method |
|---|---|
|
BBjInterpreter |
getInterpreter() |
Methods of BBjInterpreter
|
Return Value |
Method |
|---|---|
| List<Object> | call(String p_program, Object... p_args) |
| Object | eval(String p_cmd) |
| Future<T> | executeInInterpreterContext(Callable<T> p_callable) |
| boolean | isInterpreterContext() |
| void | processEvents() |
| void | processPendingEvents() |
| void |
release() release(int p_exitValue) |
| void | setErr(Object p_obj, String p_method) |
| void | setEsc(Object p_obj, String p_method) |
| void | waitVerb(double p_fractionalSeconds) |
Remarks
BBjInterpreter methods need to be called from the correct interpreter context, meaning they need to be called from the same thread that created the BBjAPI while the interpreter is still running. They will throw an error if they are called from the wrong context.
See Also
BBj Object Creation and Assignment
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.