View Javadoc

1   package delight.rhinosandox.internal;
2   
3   import delight.rhinosandox.internal.SafeNativeJavaObject;
4   import org.mozilla.javascript.Context;
5   import org.mozilla.javascript.Scriptable;
6   import org.mozilla.javascript.WrapFactory;
7   
8   @SuppressWarnings("all")
9   public class SafeWrapFactory extends WrapFactory {
10    @Override
11    public Scriptable wrapAsJavaObject(final Context cx, final Scriptable scope, final Object javaObject, final Class<?> staticType) {
12      return new SafeNativeJavaObject(scope, javaObject, staticType);
13    }
14  }