Package com.google.gwt.rpc.client.ast

Examples of com.google.gwt.rpc.client.ast.InstantiateCommand


      // ( backref = instantiate(), deserialize(), setter, ..., backref )
      byte[] currentBackRef = begin(x);

      lparen();

      InstantiateCommand makeReader = new InstantiateCommand(
          CommandClientSerializationStreamReader.class);
      /*
       * Ensure that the reader will stick around for both instantiate and
       * deserialize calls.
       */
      makeBackRef(makeReader);

      ArrayValueCommand payload = new ArrayValueCommand(Object.class);
      for (ValueCommand value : x.getValues()) {
        payload.add(value);
      }
      makeReader.set(CommandClientSerializationStreamReader.class, "payload",
          payload);

      String instantiateIdent = clientOracle.getMethodId(
          x.getSerializerClass(), "instantiate",
          SerializationStreamReader.class);
View Full Code Here


      throws SerializationException {
    if (!(value instanceof Serializable || value instanceof IsSerializable)) {
      throw new SerializationException(clazz.getName()
          + " is not a Serializable type");
    }
    InstantiateCommand x = new InstantiateCommand(clazz);
    identityMap.put(value, x);

    if (serializer.hasExtraFields(clazz.getName())) {
      // Objects with transient fields or non-trivial semantics
      for (String fieldName : serializer.getExtraFields(clazz.getName())) {
View Full Code Here

    @Override
    public boolean visit(InvokeCustomFieldSerializerCommand x, Context ctx) {
      byte[] currentBackRef = null;
      // TODO Extract the commands as an inline function
      if (!isStarted(x)) {
        InstantiateCommand makeReader = new InstantiateCommand(
            CommandClientSerializationStreamReader.class);
        /*
         * Ensure that the reader will stick around for both instantiate and
         * deserialize calls.
         */
        makeBackRef(makeReader);

        ArrayValueCommand payload = new ArrayValueCommand(Object.class);
        for (ValueCommand value : x.getValues()) {
          payload.add(value);
        }
        makeReader.set(CommandClientSerializationStreamReader.class, "payload",
            payload);

        currentBackRef = begin(x);

        String instantiateIdent = clientOracle.getMethodId(
View Full Code Here

    IdentityValueCommand ins;
    if (customSerializer != null) {
      ins = serializeWithCustomSerializer(customSerializer, value, type,
          manualType);
    } else {
      ins = new InstantiateCommand(type);
      identityMap.put(value, ins);
    }

    /*
     * If we're looking at a subclass of a manually-serialized type, the
View Full Code Here

      throws SerializationException {
    if (!(value instanceof Serializable || value instanceof IsSerializable)) {
      throw new SerializationException(clazz.getName()
          + " is not a Serializable type");
    }
    InstantiateCommand x = new InstantiateCommand(clazz);
    identityMap.put(value, x);

    if (serializer.hasExtraFields(clazz.getName())) {
      // Objects with transient fields or non-trivial semantics
      for (String fieldName : serializer.getExtraFields(clazz.getName())) {
View Full Code Here

      // ( backref = instantiate(), deserialize(), setter, ..., backref )
      byte[] currentBackRef = begin(x);

      lparen();

      InstantiateCommand makeReader = new InstantiateCommand(
          CommandClientSerializationStreamReader.class);
      /*
       * Ensure that the reader will stick around for both instantiate and
       * deserialize calls.
       */
      makeBackRef(makeReader);

      ArrayValueCommand payload = new ArrayValueCommand(Object.class);
      for (ValueCommand value : x.getValues()) {
        payload.add(value);
      }
      makeReader.set(CommandClientSerializationStreamReader.class, "payload",
          payload);

      String instantiateIdent = clientOracle.getMethodId(
          x.getSerializerClass(), "instantiate",
          SerializationStreamReader.class);
View Full Code Here

        break;
      }
      case OBJECT_TYPE: {
        // @TypeSeedName~3~... N-many setters ...
        Class<?> clazz = findClass(token);
        InstantiateCommand x = new InstantiateCommand(clazz);
        push(x);
        readSetters(clazz, x);
        break;
      }
      case INVOKE_TYPE: {
View Full Code Here

      // ( backref = instantiate(), deserialize(), setter, ..., backref )
      byte[] currentBackRef = begin(x);

      lparen();

      InstantiateCommand makeReader = new InstantiateCommand(
          CommandClientSerializationStreamReader.class);
      /*
       * Ensure that the reader will stick around for both instantiate and
       * deserialize calls.
       */
      makeBackRef(makeReader);

      ArrayValueCommand payload = new ArrayValueCommand(Object.class);
      for (ValueCommand value : x.getValues()) {
        payload.add(value);
      }
      makeReader.set(CommandClientSerializationStreamReader.class, "payload",
          payload);

      String instantiateIdent = clientOracle.getMethodId(
          x.getSerializerClass(), "instantiate",
          SerializationStreamReader.class);
View Full Code Here

        break;
      }
      case OBJECT_TYPE: {
        // @TypeSeedName~3~... N-many setters ...
        Class<?> clazz = findClass(token);
        InstantiateCommand x = new InstantiateCommand(clazz);
        push(x);
        readSetters(clazz, x);
        break;
      }
      case INVOKE_TYPE: {
View Full Code Here

      // ( backref = instantiate(), deserialize(), setter, ..., backref )
      byte[] currentBackRef = begin(x);

      lparen();

      InstantiateCommand makeReader = new InstantiateCommand(
          CommandClientSerializationStreamReader.class);
      /*
       * Ensure that the reader will stick around for both instantiate and
       * deserialize calls.
       */
      makeBackRef(makeReader);

      ArrayValueCommand payload = new ArrayValueCommand(Object.class);
      for (ValueCommand value : x.getValues()) {
        payload.add(value);
      }
      makeReader.set(CommandClientSerializationStreamReader.class, "payload",
          payload);

      String instantiateIdent = clientOracle.getMethodId(
          x.getSerializerClass(), "instantiate",
          SerializationStreamReader.class);
View Full Code Here

TOP

Related Classes of com.google.gwt.rpc.client.ast.InstantiateCommand

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.