Package com.google.gwt.dev.shell

Examples of com.google.gwt.dev.shell.JsValue$DispatchMethod


  public Object getTarget() {
    return javaDispatch.getTarget();
  }

  public void setField(String member, long jsRootedValue) {
    JsValue jsValue = new JsValueMoz64(jsRootedValue);
    int dispId = getDispId(member);
    if (dispId < 0) {
      // no field by that name
      // TODO: expandos?
      throw new RuntimeException("No such field " + member);
View Full Code Here


  public Object getTarget() {
    return javaDispatch.getTarget();
  }

  public void setField(String member, int /*long*/jsRootedValue) {
    JsValue jsValue = new JsValueMoz32/*64*/(jsRootedValue);
    int dispId = getDispId(member);
    if (dispId < 0) {
      // no field by that name
      // TODO: expandos?
      throw new RuntimeException("No such field " + member);
View Full Code Here

      }
    });
    Display.getCurrent().asyncExec(new Runnable() {
      public void run() {
        try {
          JsValue returnVal =
              createAndInvoke(
                "__isInitializersReady",
                new String[0],
                "return (window.__wbp_geckoExternal != undefined) && (window.__wbp_geckoExternal.gwtOnLoad != undefined);",
                new long[0]);
          if (!returnVal.isBoolean() || !returnVal.getBoolean()) {
            throw new HostedModeException(HostedModeException.LINUX_HOSTED_MODE_INIT_ERROR);
          }
        } catch (Throwable e) {
          m_exception[0] = e;
        }
View Full Code Here

   * TODO(jat): lift most of this interface to platform-independent code (only
   *     exceptions still need to be made platform-independent)
   */
  public void invoke(int jscontext, int jsthisInt, int[] jsargsInt,
      int returnValueInt) {
    JsValue jsthis = new JsValueMoz(jsthisInt);
    JsValue jsargs[] = new JsValue[jsargsInt.length];
    for (int i = 0; i < jsargsInt.length; ++i) {
      jsargs[i] = new JsValueMoz(jsargsInt[i]);
    }
    JsValue returnValue = new JsValueMoz(returnValueInt);
    Class[] paramTypes = method.getParameterTypes();
    int argc = paramTypes.length;
    Object args[] = new Object[argc];
    // too many arguments are ok: the extra will be silently ignored
    if (jsargs.length < argc) {
View Full Code Here

  public Object getTarget() {
    return javaDispatch.getTarget();
  }

  public void setField(String name, int jsRootedValue) {
    JsValue jsValue = new JsValueMoz(jsRootedValue);
    int dispId = classLoader.getDispId(name);
    if (dispId < 0) {
      // no field by that name
      // TODO: expandos?
      throw new RuntimeException("No such field " + name);
View Full Code Here

   *
   * TODO(jat): lift most of this interface to platform-independent code (only
   * exceptions still need to be made platform-independent)
   */
  public void invoke(int jsthisInt, int[] jsargsInt, int returnValueInt) {
    JsValue jsthis = new JsValueMoz(jsthisInt);
    JsValue jsargs[] = new JsValue[jsargsInt.length];
    for (int i = 0; i < jsargsInt.length; ++i) {
      jsargs[i] = new JsValueMoz(jsargsInt[i]);
    }
    JsValue returnValue = new JsValueMoz(returnValueInt);
    Class<?>[] paramTypes = method.getParameterTypes();
    int argc = paramTypes.length;
    Object args[] = new Object[argc];
    // too many arguments are ok: the extra will be silently ignored
    if (jsargs.length < argc) {
View Full Code Here

  public Object getTarget() {
    return javaDispatch.getTarget();
  }

  public void setField(String member, long value) {
      JsValue jsValue = new JsValueSaf(value);
      int dispId = getDispId(member);
      if (dispId < 0) {
        // TODO (knorton): We could allow expandos, but should we?
        throw new RuntimeException("No such field " + member);
      }
View Full Code Here

  public MethodDispatch(CompilingClassLoader classLoader, MethodAdaptor method) {
    this.classLoader = classLoader;
    this.method = method;
  }
  public long invoke(long jsthisInt, long[] jsargsInt) {
    JsValue jsthis = new JsValueSaf(jsthisInt);
    JsValue jsargs[] = new JsValue[jsargsInt.length];
    for (int i = 0; i < jsargsInt.length; ++i) {
      jsargs[i] = new JsValueSaf(jsargsInt[i]);
    }
    JsValueSaf returnValue = new JsValueSaf();
      Class<?>[] paramTypes = method.getParameterTypes();
View Full Code Here

      }
    });
    Display.getCurrent().asyncExec(new Runnable() {
      public void run() {
        try {
          JsValue returnVal =
              createAndInvoke(
                "__isInitializersReady",
                new String[0],
                "return (window.__wbp_geckoExternal != undefined) && (window.__wbp_geckoExternal.gwtOnLoad != undefined);",
                new int[0]);
          if (!returnVal.isBoolean() || !returnVal.getBoolean()) {
            throw new HostedModeException(HostedModeException.LINUX_HOSTED_MODE_INIT_ERROR);
          }
        } catch (Throwable e) {
          m_exception[0] = e;
        }
View Full Code Here

   *
   * TODO(jat): lift most of this interface to platform-independent code (only
   * exceptions still need to be made platform-independent)
   */
  public void invoke(long jsthisInt, long [] jsargsInt, long returnValueInt) {
    JsValue jsthis = new JsValueMoz64(jsthisInt);
    JsValue jsargs[] = new JsValue[jsargsInt.length];
    for (int i = 0; i < jsargsInt.length; ++i) {
      jsargs[i] = new JsValueMoz64(jsargsInt[i]);
    }
    JsValue returnValue = new JsValueMoz64(returnValueInt);
    invoke0(jsthis, jsargs, returnValue);
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.dev.shell.JsValue$DispatchMethod

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.