public class ProtobufSerializer extends Object implements IProtobufSerializer
| Constructor and Description |
|---|
ProtobufSerializer() |
| Modifier and Type | Method and Description |
|---|---|
Object |
fromProtobuf(com.google.protobuf.Message protobuf,
Class<?> pojoClazz)
Implement the fromProtobuf method to set all ProtoBufAttributes
on the supplied POJO class.
|
com.google.protobuf.Message |
toProtobuf(Object pojo)
Implement the toProtobuf method that will convert this
object to a GeneratedMessage G.
|
public com.google.protobuf.Message toProtobuf(Object pojo) throws ProtobufException
IProtobufSerializertoProtobuf in interface IProtobufSerializerpojo - - POJO object to serialize into a Protobuf of generic type GProtobufExceptionIProtobufSerializer.toProtobuf(java.lang.Object)public Object fromProtobuf(com.google.protobuf.Message protobuf, Class<?> pojoClazz) throws ProtobufException
IProtobufSerializerfromProtobuf in interface IProtobufSerializerprotobuf - - GeneratedMessage, the object to "deserialize" into a POJOpojoClazz - - Class type to "deserialize" toProtobufExceptionIProtobufSerializer.fromProtobuf(Message, Class)Copyright © 2014. All rights reserved.