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
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