Package com.google.gwt.dev.shell

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


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


    if (classLoader == null) {
      throw new RuntimeException("Invalid class loader.");
    }
    LowLevelWebKit.pushJsContext(jsContext);
    try {
      JsValue jsValue = new JsValueWebKit<H>(value);
      int dispId = getDispId(name);
      if (dispId < 0) {
        // TODO (knorton): We could allow expandos, but should we?
        throw new RuntimeException("No such field " + name);
      }
View Full Code Here

    CompilingClassLoader classLoader = classLoaderRef.get();
    if (classLoader == null) {
      throw new RuntimeException("Invalid class loader.");
    }     
    LowLevelWebKit.pushJsContext(jsContext);
    JsValue jsthis = new JsValueWebKit<H>(jsthisInt);
    JsValue jsargs[] = new JsValue[jsargsInt.size()];
    for (int i = 0; i < jsargsInt.size(); ++i) {
      jsargs[i] = new JsValueWebKit<H>(jsargsInt.get(i));
    }
    JsValueWebKit<H> returnValue = new JsValueWebKit<H>();
    try {
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

  /* (non-Javadoc)
   * @see com.google.gwt.dev.shell.mac.LowLevelSaf.DispatchObject#setField(java.lang.String, int)
   */
  public void setField(String name, int value) {
    JsValue jsValue = new JsValueSaf(value);
    int dispId = classLoader.getDispId(name);
    if (dispId < 0) {
      // TODO: expandos?
      throw new RuntimeException("No such field " + name);
    }
View Full Code Here

    this.method = method;
  }

  public int invoke(int execState, int jsthisInt, int[] jsargsInt) {
    LowLevelSaf.pushExecState(execState);
    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();
    try {
View Full Code Here

  }

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

  }

  public int invoke(int jsContext, int jsthisInt, int[] jsargsInt,
      int[] exception) {
    LowLevelSaf.pushJsContext(jsContext);
    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();
    try {
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.