Package org.infinispan.protostream.descriptors

Examples of org.infinispan.protostream.descriptors.Type


      return marshallerDelegate.unmarshall(null, null, this, in);
   }

   private Object readPrimitive(String fieldName, JavaType javaType) throws IOException {
      FieldDescriptor fd = messageContext.marshallerDelegate.getFieldsByName().get(fieldName);
      Type type = fd.getType();
      if (type == Type.ENUM
            || type == Type.GROUP
            || type == Type.MESSAGE) {
         throw new IllegalArgumentException("Declared field type is not a primitive : " + fd.getFullName());
      }
View Full Code Here


      return collection;
   }

   private void readPrimitiveCollection(FieldDescriptor fd, Collection<? super Object> collection, Class elementClass) throws IOException {
      int expectedTag = WireFormat.makeTag(fd.getNumber(), fd.getType().getWireType());
      Type type = fd.getType();

      while (true) {
         Object o = messageContext.unknownFieldSet.consumeTag(expectedTag);
         if (o == null) {
            break;
View Full Code Here

   }

   private void writePrimitiveCollection(FieldDescriptor fd, Collection<?> collection, Class elementClass) throws IOException {
      CodedOutputStream out = messageContext.out;
      int fieldNumber = fd.getNumber();
      Type type = fd.getType();
      switch (type) {
         case DOUBLE:
            for (Object value : collection) {  //todo check (value != null && value.getClass() == elementClass)
               out.writeDouble(fieldNumber, (Double) value);
            }
View Full Code Here

   }

   private void writePrimitiveCollection(FieldDescriptor fd, Collection<?> collection, Class elementClass) throws IOException {
      CodedOutputStream out = messageContext.out;
      int fieldNumber = fd.getNumber();
      Type type = fd.getType();
      switch (type) {
         case DOUBLE:
            for (Object value : collection) {  //todo check (value != null && value.getClass() == elementClass)
               out.writeDouble(fieldNumber, (Double) value);
            }
View Full Code Here

      return marshallerDelegate.unmarshall(null, null, this, in);
   }

   private Object readPrimitive(String fieldName, JavaType javaType) throws IOException {
      FieldDescriptor fd = messageContext.marshallerDelegate.getFieldsByName().get(fieldName);
      Type type = fd.getType();
      if (type == Type.ENUM
            || type == Type.GROUP
            || type == Type.MESSAGE) {
         throw new IllegalArgumentException("Declared field type is not a primitive : " + fd.getFullName());
      }
View Full Code Here

      return collection;
   }

   private void readPrimitiveCollection(FieldDescriptor fd, Collection<? super Object> collection, Class elementClass) throws IOException {
      int expectedTag = WireFormat.makeTag(fd.getNumber(), fd.getType().getWireType());
      Type type = fd.getType();

      while (true) {
         Object o = messageContext.unknownFieldSet.consumeTag(expectedTag);
         if (o == null) {
            break;
View Full Code Here

TOP

Related Classes of org.infinispan.protostream.descriptors.Type

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.