Package org.infinispan.protostream

Examples of org.infinispan.protostream.EnumMarshaller


         out.writeTag(WRAPPED_BYTES, WireFormat.WIRETYPE_LENGTH_DELIMITED);
         out.writeRawVarint32(bytes.length);
         out.writeRawBytes(bytes);
      } else if (t instanceof Enum) {
         // use an enum encoder
         EnumMarshaller enumMarshaller = (EnumMarshaller) ctx.getMarshaller((Class<Enum>) t.getClass());
         out.writeString(WRAPPED_DESCRIPTOR_FULL_NAME, enumMarshaller.getTypeName());
         out.writeEnum(WRAPPED_ENUM, enumMarshaller.encode((Enum) t));
      } else {
         // this is either an unknown primitive type or a message type
         // try to use a message marshaller
         BaseMarshaller marshaller = ctx.getMarshaller(t.getClass());
         out.writeString(WRAPPED_DESCRIPTOR_FULL_NAME, marshaller.getTypeName());
View Full Code Here

TOP

Related Classes of org.infinispan.protostream.EnumMarshaller

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.