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

java.lang.Object
  extended by org.mozilla.javascript.WrapFactory
      extended by org.apache.sling.scripting.javascript.helper.SlingWrapFactory

public class SlingWrapFactory
extends org.mozilla.javascript.WrapFactory


Constructor Summary
SlingWrapFactory()
           
 
Method Summary
 void registerWrapper(java.lang.Class<?> javaClass, java.lang.String hostObjectName)
           
 void unregisterWrapper(java.lang.Class<?> javaClass)
           
 org.mozilla.javascript.Scriptable wrapAsJavaObject(org.mozilla.javascript.Context cx, org.mozilla.javascript.Scriptable scope, java.lang.Object javaObject, java.lang.Class staticType)
           
 
Methods inherited from class org.mozilla.javascript.WrapFactory
isJavaPrimitiveWrap, setJavaPrimitiveWrap, wrap, wrapNewObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SlingWrapFactory

public SlingWrapFactory()
Method Detail

wrapAsJavaObject

public org.mozilla.javascript.Scriptable wrapAsJavaObject(org.mozilla.javascript.Context cx,
                                                          org.mozilla.javascript.Scriptable scope,
                                                          java.lang.Object javaObject,
                                                          java.lang.Class staticType)
Overrides:
wrapAsJavaObject in class org.mozilla.javascript.WrapFactory
Parameters:
cx - the current Context for this thread
scope - the scope of the executing script
javaObject - the object to be wrapped
staticType - type hint. If security restrictions prevent to wrap object based on its class, staticType will be used instead.
Returns:
the wrapped value which shall not be null

registerWrapper

public void registerWrapper(java.lang.Class<?> javaClass,
                            java.lang.String hostObjectName)

unregisterWrapper

public void unregisterWrapper(java.lang.Class<?> javaClass)


Copyright © 2007-2009. All Rights Reserved.