Package org.jboss.errai.marshalling.client.api

Examples of org.jboss.errai.marshalling.client.api.Marshaller


        buf.append(",");
      }
      key = entry.getKey();
      val = entry.getValue();

      final Marshaller valueMarshaller;
      buf.append("\"").append(key).append("\"");

      buf.append(":");

      if (val == null) {
        buf.append("null");
      }
      else {
        if ((val instanceof Number && !(val instanceof BigInteger || val instanceof BigDecimal))
                || val instanceof Boolean || val instanceof Character) {

          valueMarshaller = MarshallUtil.getQualifiedNumberMarshaller(val);
        }
        else {
          if (!ctx.getMappingContext().hasMarshaller(val.getClass().getName())) {
            val = val.toString();
            valueMarshaller = StringMarshaller.INSTANCE;
          }
          else {
            valueMarshaller = MarshallUtil.getMarshaller(val, ctx);
          }
        }
        buf.append(valueMarshaller.marshall(val, ctx));
      }
    }

    return buf.append("}").toString();
  }
View Full Code Here


        buf.append(",");
      }
      key = entry.getKey();
      val = entry.getValue();

      final Marshaller valueMarshaller;
      buf.append("\"").append(key).append("\"");

      buf.append(":");

      if (val == null) {
        buf.append("null");
      }
      else {
        if ((val instanceof Number && !(val instanceof BigInteger || val instanceof BigDecimal))
                || val instanceof Boolean || val instanceof Character) {

          valueMarshaller = MarshallUtil.getQualifiedNumberMarshaller(val);
        }
        else {
          if (!ctx.getMappingContext().hasMarshaller(val.getClass().getName())) {
            val = val.toString();
            valueMarshaller = StringMarshaller.INSTANCE;
          }
          else {
            valueMarshaller = MarshallUtil.getMarshaller(MarshallUtil.maybeUnwrap(val), ctx);
          }
        }
        if (val instanceof WrappedPortable) {
          val = ((WrappedPortable) val).unwrap();
        }
        buf.append(valueMarshaller.marshall(val, ctx));
      }
    }

    return buf.append("}").toString();
  }
View Full Code Here

        buf.append(",");
      }
      key = entry.getKey();
      val = entry.getValue();

      final Marshaller valueMarshaller;
      buf.append("\"").append(key).append("\"");

      buf.append(":");

      if (val == null) {
        buf.append("null");
      }
      else {
        if ((val instanceof Number && !(val instanceof BigInteger || val instanceof BigDecimal))
                || val instanceof Boolean || val instanceof Character) {

          valueMarshaller = MarshallUtil.getQualifiedNumberMarshaller(val);
        }
        else {
          if (!ctx.getMappingContext().hasMarshaller(val.getClass().getName())) {
            val = val.toString();
            valueMarshaller = StringMarshaller.INSTANCE;
          }
          else {
            valueMarshaller = MarshallUtil.getMarshaller(MarshallUtil.maybeUnwrap(val), ctx);
          }
        }
        if (val instanceof WrappedPortable) {
          val = ((WrappedPortable) val).unwrap();
        }
        buf.append(valueMarshaller.marshall(val, ctx));
      }
    }

    return buf.append("}").toString();
  }
View Full Code Here

TOP

Related Classes of org.jboss.errai.marshalling.client.api.Marshaller

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.