Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.hartmath.lib
Class BeanShell  view BeanShell download BeanShell.java

java.lang.Object
  extended bycom.hartmath.lib.BeanShell

public class BeanShell
extends java.lang.Object

Description of the Class


Field Summary
private static int cachedBlockCounter
           
private static bsh.NameSpace global
           
private static bsh.NameSpace internal
           
private static bsh.Interpreter interpForMethods
           
private static boolean running
           
 
Constructor Summary
BeanShell()
          Constructor for the BeanShell object
 
Method Summary
static java.lang.String cacheBlock(java.lang.String id, java.lang.String code, boolean childNamespace)
          Returns the specified method reference.
private static bsh.Interpreter createInterpreter(bsh.NameSpace nameSpace)
          Description of the Method
static java.lang.Object eval(com.hartmath.Main view, java.lang.String command, boolean rethrowBshErrors)
          Evaluates the specified BeanShell expression.
static com.hartmath.expression.HObject evalHObject(com.hartmath.Main view, java.lang.String command, boolean rethrowBshErrors)
          Evaluates the specified BeanShell expression.
static bsh.NameSpace getNameSpace()
          Returns the global namespace.
static void init()
          Invokes the specified method reference.
static boolean isScriptRunning()
          Returns if a BeanShell script or macro is currently running.
static com.hartmath.expression.HObject mapObject(java.lang.Object obj)
          Description of the Method
static java.lang.Object runCachedBlock(java.lang.String id, com.hartmath.Main view, bsh.NameSpace namespace)
          Runs a cached block of code in the specified namespace.
static com.hartmath.expression.HObject runScript(Session hmSession, com.hartmath.expression.HObject obj, java.lang.String fileName, boolean ownNamespace, boolean rethrowBshErrors)
          Returns the BeanShell interpreter instance.
static com.hartmath.expression.HObject runScript(Session hmSession, com.hartmath.expression.HObject obj, java.lang.String path, java.io.Reader in, boolean ownNamespace, boolean rethrowBshErrors)
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

interpForMethods

private static bsh.Interpreter interpForMethods

running

private static boolean running

internal

private static bsh.NameSpace internal

global

private static bsh.NameSpace global

cachedBlockCounter

private static int cachedBlockCounter
Constructor Detail

BeanShell

public BeanShell()
Constructor for the BeanShell object

Method Detail

isScriptRunning

public static boolean isScriptRunning()
Returns if a BeanShell script or macro is currently running.

Since:
jEdit 2.7pre2

getNameSpace

public static bsh.NameSpace getNameSpace()
Returns the global namespace.

Since:
jEdit 3.2pre5

cacheBlock

public static java.lang.String cacheBlock(java.lang.String id,
                                          java.lang.String code,
                                          boolean childNamespace)
Returns the specified method reference. Returns the specified method reference. Caches a block of code, returning a handle that can be passed to runCachedBlock().

Since:
jEdit 2.7pre2, jEdit 2.7pre2, jEdit 3.2pre5

runCachedBlock

public static java.lang.Object runCachedBlock(java.lang.String id,
                                              com.hartmath.Main view,
                                              bsh.NameSpace namespace)
Runs a cached block of code in the specified namespace. Faster than evaluating the block each time.

Since:
jEdit 3.2pre5

runScript

public static com.hartmath.expression.HObject runScript(Session hmSession,
                                                        com.hartmath.expression.HObject obj,
                                                        java.lang.String fileName,
                                                        boolean ownNamespace,
                                                        boolean rethrowBshErrors)
                                                 throws java.lang.Throwable
Returns the BeanShell interpreter instance. Returns the BeanShell interpreter instance. Runs a BeanShell script.

Since:
jEdit 3.0pre5, jEdit 3.0pre5

runScript

public static com.hartmath.expression.HObject runScript(Session hmSession,
                                                        com.hartmath.expression.HObject obj,
                                                        java.lang.String path,
                                                        java.io.Reader in,
                                                        boolean ownNamespace,
                                                        boolean rethrowBshErrors)
                                                 throws java.lang.Throwable
Description of the Method


mapObject

public static com.hartmath.expression.HObject mapObject(java.lang.Object obj)
Description of the Method


eval

public static java.lang.Object eval(com.hartmath.Main view,
                                    java.lang.String command,
                                    boolean rethrowBshErrors)
Evaluates the specified BeanShell expression.

Since:
jEdit 2.7pre3

evalHObject

public static com.hartmath.expression.HObject evalHObject(com.hartmath.Main view,
                                                          java.lang.String command,
                                                          boolean rethrowBshErrors)
Evaluates the specified BeanShell expression.

Since:
jEdit 2.7pre3

init

public static void init()
Invokes the specified method reference. Invokes the specified method reference. Description of the Method

Since:
jEdit 2.7pre2, jEdit 2.7pre2

createInterpreter

private static bsh.Interpreter createInterpreter(bsh.NameSpace nameSpace)
Description of the Method