Re: [protobuf] How to convert Descriptors.Descriptor to Java class name?

2011-06-20 Thread Pherl Liu
Quoted from our internal discussion by Kenton: You should build a MapDescriptor, Message upfront, mapping every descriptor you care about to the corresponding default instance. Avoid using Class objects because that will make your code incompatible with DynamicMessage. Using default instances

[protobuf] How to convert Descriptors.Descriptor to Java class name?

2011-06-06 Thread ondrej par
Hi all, is there a convenient way to extract the name of Java (generated) class that represents the Message from Descriptors.Descriptor? What I need is a method with the following signature: public Class? extends Message extractJavaClass(Descriptors.Descriptor d); I can derive class name using