Re: [protobuf] java parse with class known at runtime (and compiled proto)

2010-12-03 Thread Siju Varghese
Take a look at https://github.com/sijuv/protobuf-codec/blob/master/src/main/java/com/google/protobuf/codec/Codec.java https://github.com/sijuv/protobuf-codec/blob/master/src/main/java/com/google/protobuf/codec/AbstractCodec.java

Re: [protobuf] java parse with class known at runtime (and compiled proto)

2010-12-03 Thread Evan Jones
On Dec 3, 2010, at 14:21 , Koert Kuipers wrote: public class ProtobufDeserializer { public T fromByteBuffer(ByteBuffer byteBuffer) { I don't *think* the generic type is going to be enough due to erasure, but I'm not a generics expert. I know something like the following works (I may be

[protobuf] java parse with class known at runtime (and compiled proto)

2010-12-03 Thread Koert Kuipers
Hey all, I found a bunch of threads on this topic already, but i cannot figure it out. This is my situation: * proto files have been compiled and java classes for them are available * i need to deserialize messages with different types * the class of the message type is available at the time of d