org.apache.bsf.engines.javascript
Class JsContextStub

java.lang.Object
  |
  +--org.apache.bsf.debug.util.Skeleton
        |
        +--org.apache.bsf.engines.javascript.JsContextStub
All Implemented Interfaces:
JsContext, java.rmi.Remote

public class JsContextStub
extends Skeleton
implements JsContext

Insert the type's description here. Creation date: (8/23/2001 4:16:50 PM)


Constructor Summary
JsContextStub(RhinoContextProxy rcp, org.mozilla.javascript.debug.DebugFrame frame, int frameno)
          JsContextStub constructor comment.
 
Method Summary
 JsObject bind(java.lang.String id)
           
 JsCode getCode()
           
 int getDepth()
           
 JsEngine getEngine()
           
 int getLineNumber()
           
 JsObject getScope()
          Scope of a context.
 java.lang.String getSourceName()
           
 JsObject getThis()
           
 boolean isEvalContext()
           
 boolean isFunctionContext()
           
 boolean isScriptContext()
           
 java.lang.Object lookupName(org.mozilla.javascript.Scriptable scopeChain, java.lang.String id)
          Looks up a name in the scope chain and returns its value.
 java.lang.Object lookupName(java.lang.String name)
           
 
Methods inherited from class org.apache.bsf.debug.util.Skeleton
addListener, allocOid, completeFuture, createFuture, equals, getTid, getUid, hasNoUid, removeListener, suspendFuture
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JsContextStub

public JsContextStub(RhinoContextProxy rcp,
                     org.mozilla.javascript.debug.DebugFrame frame,
                     int frameno)
              throws java.rmi.RemoteException
JsContextStub constructor comment.

Method Detail

bind

public JsObject bind(java.lang.String id)
              throws java.rmi.RemoteException
Specified by:
bind in interface JsContext
java.rmi.RemoteException

getCode

public JsCode getCode()
Specified by:
getCode in interface JsContext

getDepth

public int getDepth()
Specified by:
getDepth in interface JsContext

getEngine

public JsEngine getEngine()
Specified by:
getEngine in interface JsContext

getLineNumber

public int getLineNumber()
Specified by:
getLineNumber in interface JsContext

getScope

public JsObject getScope()
                  throws java.rmi.RemoteException
Description copied from interface: JsContext
Scope of a context. See ECMA 262, 3rd edition, 10.1.6 through 10.1.8 The scope depends on if the context represents global code, eval code, or function code. Global Code: The scope chain is cerated and initialised to contain the global objects and no others. Eval Code: The scope chain is initialized to contains the same scope chain as the calling context. This includes the same activation object and therefore the same arguments and local variables. Function Code: The scope chain is initialised to contain the activation object followed by the objects in the scope chain stored in the [[Scope]] property of the Function object.

Specified by:
getScope in interface JsContext
java.rmi.RemoteException

getSourceName

public java.lang.String getSourceName()
Specified by:
getSourceName in interface JsContext

getThis

public JsObject getThis()
                 throws java.rmi.RemoteException
Specified by:
getThis in interface JsContext
java.rmi.RemoteException

isEvalContext

public boolean isEvalContext()

isFunctionContext

public boolean isFunctionContext()

isScriptContext

public boolean isScriptContext()

lookupName

public java.lang.Object lookupName(java.lang.String name)

lookupName

public java.lang.Object lookupName(org.mozilla.javascript.Scriptable scopeChain,
                                   java.lang.String id)
Looks up a name in the scope chain and returns its value.