Package com.google.gwt.dev.shell

Examples of com.google.gwt.dev.shell.MethodAdaptor


        } else if ((flags & COM.DISPATCH_PROPERTYGET) != 0) {
          // property get on the method itself
          try {
            Method gwtOnLoadMethod =
                getClass().getMethod("gwtOnLoad", new Class[]{IDispatch.class});
            MethodAdaptor methodAdaptor = new MethodAdaptor(gwtOnLoadMethod);
            IDispatchImpl funcObj = new MethodDispatch(null, methodAdaptor);
            IDispatch disp = new IDispatch(funcObj.getAddress());
            disp.AddRef();
            return new Variant(disp);
          } catch (Exception e) {
View Full Code Here


        int jsval = jsValue.getJsValue();
        // Native code will eat an extra ref.
        LowLevelSaf.gcProtect(jsContext, jsval);
        return jsval;
      } else {
        MethodAdaptor method = javaDispatch.getMethod(dispId);
        AccessibleObject obj = method.getUnderlyingObject();
        DispatchMethod dispMethod = (DispatchMethod) classLoader.getWrapperForObject(obj);
        if (dispMethod == null) {
          dispMethod = new MethodDispatch(classLoader, method);
          classLoader.putWrapperForObject(obj, dispMethod);
        }
        // Native code eats the same ref it gave us.
        return LowLevelSaf.wrapDispatchMethod(jsContext, method.toString(),
            dispMethod);
      }
    } finally {
      LowLevelSaf.popJsContext(jsContext);
    }
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.shell.MethodAdaptor

Copyright © 2018 www.massapicom. 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.