org.apache.sling.scripting.javascript.helper
Class SlingContextFactory

java.lang.Object
  extended by org.mozilla.javascript.ContextFactory
      extended by org.apache.sling.scripting.javascript.helper.SlingContextFactory

public class SlingContextFactory
extends org.mozilla.javascript.ContextFactory

The SlingContextFactory extends the standard Rhino ContextFactory to provide customized settings, such as having the dynamic scope feature enabled by default. Other functionality, which may be added would be something like a configurable maximum script runtime value.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.mozilla.javascript.ContextFactory
org.mozilla.javascript.ContextFactory.Listener
 
Method Summary
 void exitDebugger()
           
protected  boolean hasFeature(org.mozilla.javascript.Context cx, int featureIndex)
           
 boolean isDebugging()
           
protected  org.mozilla.javascript.Context makeContext()
           
protected  void onContextCreated(org.mozilla.javascript.Context cx)
           
 void setDebugging(boolean enable)
           
static void setup(org.mozilla.javascript.tools.debugger.ScopeProvider sp)
           
static void teardown()
           
 
Methods inherited from class org.mozilla.javascript.ContextFactory
addListener, call, checkNotSealed, createClassLoader, doTopCall, enter, enter, exit, getApplicationClassLoader, getE4xImplementationFactory, getGlobal, hasExplicitGlobal, initApplicationClassLoader, initGlobal, isSealed, observeInstructionCount, onContextReleased, removeListener, seal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setup

public static void setup(org.mozilla.javascript.tools.debugger.ScopeProvider sp)

teardown

public static void teardown()

makeContext

protected org.mozilla.javascript.Context makeContext()
Overrides:
makeContext in class org.mozilla.javascript.ContextFactory

hasFeature

protected boolean hasFeature(org.mozilla.javascript.Context cx,
                             int featureIndex)
Overrides:
hasFeature in class org.mozilla.javascript.ContextFactory

onContextCreated

protected void onContextCreated(org.mozilla.javascript.Context cx)
Overrides:
onContextCreated in class org.mozilla.javascript.ContextFactory

exitDebugger

public void exitDebugger()

setDebugging

public void setDebugging(boolean enable)

isDebugging

public boolean isDebugging()


Copyright © 2007-2009. All Rights Reserved.