There's an example on the Techniques wiki page:
http://code.google.com/apis/protocolbuffers/docs/techniques.html#union
--Pete
See Peter's email. But you can also use
msg.getDescriptorForType().getFullName() to get a unique string for
each protocol buffer message type. This is what I do for my own RPC
system, which needs to be able to handle *any* message type (hence the
"union" or "extension" approaches are not really correct). This needs
the non-lite runtime, in order to have descriptors for messages. See:
Evan
--
Evan Jones
http://evanjones.ca/