public class SecureWrapFactory extends RingoWrapFactory
| Modifier and Type | Class and Description |
|---|---|
static class |
SecureWrapFactory.SecureClassWrapper |
static class |
SecureWrapFactory.SecureObjectWrapper |
| Constructor and Description |
|---|
SecureWrapFactory() |
| Modifier and Type | Method and Description |
|---|---|
org.mozilla.javascript.Scriptable |
wrapAsJavaObject(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable scope,
Object javaObject,
Class<?> staticType)
Wrap Java object as Scriptable instance to allow full access to its
methods and fields from JavaScript.
|
org.mozilla.javascript.Scriptable |
wrapJavaClass(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable scope,
Class javaClass)
Wrap a Java class as Scriptable instance to allow access to its static
members and fields and use as constructor from JavaScript.
|
wrappublic org.mozilla.javascript.Scriptable wrapAsJavaObject(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable scope,
Object javaObject,
Class<?> staticType)
wrapAsJavaObject in class org.mozilla.javascript.WrapFactorycx - the current Context for this threadscope - the scope of the executing scriptjavaObject - the object to be wrappedstaticType - type hint. If security restrictions prevent to wrap
object based on its class, staticType will be used instead.public org.mozilla.javascript.Scriptable wrapJavaClass(org.mozilla.javascript.Context cx,
org.mozilla.javascript.Scriptable scope,
Class javaClass)
Subclasses can override this method to provide custom wrappers for Java classes.
wrapJavaClass in class org.mozilla.javascript.WrapFactorycx - the current Context for this threadscope - the scope of the executing scriptjavaClass - the class to be wrappedCopyright © 2016. All rights reserved.