Examples of WrapFactory


Examples of com.dotcms.repackage.org.mozilla.javascript.WrapFactory

            (bean.bean instanceof Boolean)) {
            global.put(bean.name, global, bean.bean);
        }
        else {
            // Must wrap non-scriptable objects before presenting to Rhino
          WrapFactory wf = new WrapFactory();
          Scriptable wrapped = wf.wrapAsJavaObject(Context.enter(), global, bean.bean, bean.type);
//            Scriptable wrapped = Context.toObject(bean.bean, global);
            global.put(bean.name, global, wrapped);
        }
    }
View Full Code Here

Examples of org.mozilla.javascript.WrapFactory

                // parent scope to null. This means that any variables created
                // by assignments will be properties of "scope".
                scope.setParentScope(null);

                // setup the context for use
                WrapFactory wrapFactory = ((RhinoJavaScriptEngineFactory) getFactory()).getWrapFactory();
                rhinoContext.setWrapFactory(wrapFactory);

                // this is the top level call
                isTopLevelCall = true;
            }
View Full Code Here

Examples of org.mozilla.javascript.WrapFactory

  public static void messWithClassLoader() {
    ContextFactory.initGlobal(new ContextFactory() {
      @Override
      protected Context makeContext() {
        Context cx = super.makeContext();
        cx.setWrapFactory(new WrapFactory() {
          @Override
          public Object wrap(Context cx, Scriptable scope, Object obj, Class staticType) {
            return super.wrap(cx, scope, obj, staticType);
          }
          @Override
View Full Code Here

Examples of org.mozilla.javascript.WrapFactory

  public static void messWithClassLoader() {
    ContextFactory.initGlobal(new ContextFactory() {
      @Override
      protected Context makeContext() {
        Context cx = super.makeContext();
        cx.setWrapFactory(new WrapFactory() {
          @Override
          public Object wrap(Context cx, Scriptable scope, Object obj, Class staticType) {
            return super.wrap(cx, scope, obj, staticType);
          }
          @Override
View Full Code Here

Examples of org.mozilla.javascript.WrapFactory

    public static void messWithClassLoader() {
      ContextFactory.initGlobal(new ContextFactory() {
        @Override
        protected Context makeContext() {
          Context cx = super.makeContext();
          cx.setWrapFactory(new WrapFactory() {
            @Override
            public Object wrap(Context cx, Scriptable scope, Object obj, Class staticType) {
              return super.wrap(cx, scope, obj, staticType);
            }
            @Override
View Full Code Here

Examples of org.mozilla.javascript.WrapFactory

    public static void messWithClassLoader() {
      ContextFactory.initGlobal(new ContextFactory() {
        @Override
        protected Context makeContext() {
          Context cx = super.makeContext();
          cx.setWrapFactory(new WrapFactory() {
            @Override
            public Object wrap(Context cx, Scriptable scope, Object obj, Class staticType) {
              return super.wrap(cx, scope, obj, staticType);
            }
            @Override
View Full Code Here

Examples of org.mozilla.javascript.WrapFactory

                // parent scope to null. This means that any variables created
                // by assignments will be properties of "scope".
                scope.setParentScope(null);

                // setup the context for use
                WrapFactory wrapFactory = ((RhinoJavaScriptEngineFactory) getFactory()).getWrapFactory();
                rhinoContext.setWrapFactory(wrapFactory);
            }

            // add initial properties to the scope
            replacedProperties = setBoundProperties(scope, bindings);
View Full Code Here

Examples of org.mozilla.javascript.WrapFactory

    public static void messWithClassLoader() {
      ContextFactory.initGlobal(new ContextFactory() {
        @Override
        protected Context makeContext() {
          Context cx = super.makeContext();
          cx.setWrapFactory(new WrapFactory() {
            @Override
            public Object wrap(Context cx, Scriptable scope, Object obj, Class staticType) {
              return super.wrap(cx, scope, obj, staticType);
            }
            @Override
View Full Code Here

Examples of org.mozilla.javascript.WrapFactory

  public static void messWithClassLoader() {
    ContextFactory.initGlobal(new ContextFactory() {
      @Override
      protected Context makeContext() {
        Context cx = super.makeContext();
        cx.setWrapFactory(new WrapFactory() {
          @Override
          public Object wrap(Context cx, Scriptable scope, Object obj, Class staticType) {
            return super.wrap(cx, scope, obj, staticType);
          }
          @Override
View Full Code Here

Examples of org.mozilla.javascript.WrapFactory

  public static void messWithClassLoader() {
    ContextFactory.initGlobal(new ContextFactory() {
      @Override
      protected Context makeContext() {
        Context cx = super.makeContext();
        cx.setWrapFactory(new WrapFactory() {
          @Override
          public Object wrap(Context cx, Scriptable scope, Object obj, Class staticType) {
            return super.wrap(cx, scope, obj, staticType);
          }
          @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.