All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.protostream.sampledomain.Account$___Marshaller_21c78f4be5de83dee74a5ec75576d1a5a85b28bb1c356111608c96d139bbeeff Maven / Gradle / Ivy

/*
 Generated by org.infinispan.protostream.annotations.impl.processor.MarshallerSourceCodeGenerator
 for class org.infinispan.protostream.sampledomain.Account
*/

package org.infinispan.protostream.sampledomain;

import org.infinispan.protostream.sampledomain.Account;

/**
 * WARNING: Generated code! Do not edit!
 */
@javax.annotation.processing.Generated(
   value = "org.infinispan.protostream.annotations.impl.processor.AutoProtoSchemaBuilderAnnotationProcessor",
   comments = "Please do not edit this file!"
)
@SuppressWarnings("all")
public final class Account$___Marshaller_21c78f4be5de83dee74a5ec75576d1a5a85b28bb1c356111608c96d139bbeeff extends org.infinispan.protostream.annotations.impl.GeneratedMarshallerBase implements org.infinispan.protostream.ProtobufTagMarshaller {

   private org.infinispan.protostream.impl.BaseMarshallerDelegate __md$4;

   private org.infinispan.protostream.impl.BaseMarshallerDelegate __md$5;

   private org.infinispan.protostream.impl.EnumMarshallerDelegate __md$7e;

   @Override
   public Class getJavaClass() { return org.infinispan.protostream.sampledomain.Account.class; }

   @Override
   public String getTypeName() { return "sample_bank_account.Account"; }

   @Override
   public org.infinispan.protostream.sampledomain.Account read(org.infinispan.protostream.ProtobufTagMarshaller.ReadContext $1) throws java.io.IOException {
      final org.infinispan.protostream.TagReader $in = $1.getReader();
      final org.infinispan.protostream.sampledomain.Account o = new org.infinispan.protostream.sampledomain.Account();
      long __bits$0 = 0;
      java.util.ArrayList __c$6 = new java.util.ArrayList();
      java.util.ArrayList __c$7 = null;
      boolean done = false;
      while (!done) {
         final int tag = $in.readTag();
         switch (tag) {
            case 0: {
               done = true;
               break;
            }
            case (1 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_VARINT): {
               int __v$1 = $in.readInt32();
               o.setId(__v$1);
               __bits$0 |= 1L;
               break;
            }
            case (2 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_LENGTH_DELIMITED): {
               java.lang.String __v$2 = $in.readString();
               o.setDescription(__v$2);
               break;
            }
            case (3 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_FIXED64): {
               java.util.Date __v$3 = new java.util.Date($in.readFixed64());
               o.setCreationDate(__v$3);
               break;
            }
            case (4 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_LENGTH_DELIMITED): {
               if (__md$4 == null) __md$4 = ((org.infinispan.protostream.impl.SerializationContextImpl) $1.getSerializationContext()).getMarshallerDelegate(org.infinispan.protostream.sampledomain.Account.Limits.class);
               int length = $in.readUInt32();
               int oldLimit = $in.pushLimit(length);
               org.infinispan.protostream.sampledomain.Account.Limits __v$4 = (org.infinispan.protostream.sampledomain.Account.Limits) readMessage(__md$4, $1);
               $in.checkLastTagWas(0);
               $in.popLimit(oldLimit);
               o.setLimits(__v$4);
               break;
            }
            case (5 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_LENGTH_DELIMITED): {
               if (__md$5 == null) __md$5 = ((org.infinispan.protostream.impl.SerializationContextImpl) $1.getSerializationContext()).getMarshallerDelegate(org.infinispan.protostream.sampledomain.Account.Limits.class);
               int length = $in.readUInt32();
               int oldLimit = $in.pushLimit(length);
               org.infinispan.protostream.sampledomain.Account.Limits __v$5 = (org.infinispan.protostream.sampledomain.Account.Limits) readMessage(__md$5, $1);
               $in.checkLastTagWas(0);
               $in.popLimit(oldLimit);
               o.setHardLimits(__v$5);
               break;
            }
            case (6 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_LENGTH_DELIMITED): {
               byte[] __v$6 = $in.readByteArray();
               __c$6.add(__v$6);
               break;
            }
            case (7 << org.infinispan.protostream.descriptors.WireType.TAG_TYPE_NUM_BITS | org.infinispan.protostream.descriptors.WireType.WIRETYPE_VARINT): {
               if (__md$7e == null) __md$7e = (org.infinispan.protostream.impl.EnumMarshallerDelegate)((org.infinispan.protostream.impl.SerializationContextImpl) $1.getSerializationContext()).getMarshallerDelegate(org.infinispan.protostream.sampledomain.Account.Currency.class);
               int enumVal = $in.readEnum();
               org.infinispan.protostream.sampledomain.Account.Currency __v$7 = (org.infinispan.protostream.sampledomain.Account.Currency) __md$7e.getMarshaller().decode(enumVal);
               if (__v$7 == null) {
               } else {
                  if (__c$7 == null) __c$7 = new java.util.ArrayList();
                  __c$7.add(__v$7);
               }
               break;
            }
            default: {
               if (!$in.skipField(tag)) done = true;
            }
         }
      }
      if ((__bits$0 & 1L) == 0) {
         o.setId(0);
      }
      o.setBlurb(__c$6);

      if (__c$7 != null){
         o.setCurrencies((org.infinispan.protostream.sampledomain.Account.Currency[])__c$7.toArray(new org.infinispan.protostream.sampledomain.Account.Currency[0]));
      } else {
         o.setCurrencies(new org.infinispan.protostream.sampledomain.Account.Currency[0]);
      }

      return o;
   }

   @Override
   public void write(org.infinispan.protostream.ProtobufTagMarshaller.WriteContext $1, org.infinispan.protostream.sampledomain.Account $2) throws java.io.IOException {
      org.infinispan.protostream.impl.TagWriterImpl $out = (org.infinispan.protostream.impl.TagWriterImpl) $1.getWriter();
      final org.infinispan.protostream.sampledomain.Account o = (org.infinispan.protostream.sampledomain.Account) $2;
      {
         final int __v$1 = o.getId();
         $out.writeInt32(1, __v$1);
      }
      {
         final java.lang.String __v$2 = o.getDescription();
         if (__v$2 != null) $out.writeString(2, __v$2);
      }
      {
         final java.util.Date __v$3 = o.getCreationDate();
         if (__v$3 != null) $out.writeFixed64(3, __v$3.getTime());
      }
      {
         final org.infinispan.protostream.sampledomain.Account.Limits __v$4 = (org.infinispan.protostream.sampledomain.Account.Limits) o.getLimits();
         if (__v$4 != null) {
            if (__md$4 == null) __md$4 = ((org.infinispan.protostream.impl.SerializationContextImpl) $1.getSerializationContext()).getMarshallerDelegate(org.infinispan.protostream.sampledomain.Account.Limits.class);
            writeNestedMessage(__md$4, $out, 4, __v$4);
         }
      }
      {
         final org.infinispan.protostream.sampledomain.Account.Limits __v$5 = (org.infinispan.protostream.sampledomain.Account.Limits) o.getHardLimits();
         if (__v$5 != null) {
            if (__md$5 == null) __md$5 = ((org.infinispan.protostream.impl.SerializationContextImpl) $1.getSerializationContext()).getMarshallerDelegate(org.infinispan.protostream.sampledomain.Account.Limits.class);
            writeNestedMessage(__md$5, $out, 5, __v$5);
         }
      }
      {
         final java.util.Collection __c$6 = o.getBlurb();
         if (__c$6 != null) 
            for (java.util.Iterator it = __c$6.iterator(); it.hasNext(); ) {
               final byte[] __v$6 = it.next();
               $out.writeBytes(6, __v$6);
            }
      }
      {
         final org.infinispan.protostream.sampledomain.Account.Currency[] __a$7 = (org.infinispan.protostream.sampledomain.Account.Currency[]) o.getCurrencies();
         if (__a$7 != null) 
            for (int i = 0; i < __a$7.length; i++) {
               final org.infinispan.protostream.sampledomain.Account.Currency __v$7 = __a$7[i];
               {
                  if (__md$7e == null) __md$7e = (org.infinispan.protostream.impl.EnumMarshallerDelegate)((org.infinispan.protostream.impl.SerializationContextImpl) $1.getSerializationContext()).getMarshallerDelegate(org.infinispan.protostream.sampledomain.Account.Currency.class);
                  $out.writeEnum(7, __md$7e.getMarshaller().encode(__v$7));
               }
            }
      }
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy