Re: ExtensionRegistry usage.

2009-07-30 Thread Kenton Varda
The Builder interface has a method setField() which takes a FieldDescriptor and a value. You can pass the FieldDescriptor for an extension to set an extension, and pass the message object as the value. You can get the FieldDescriptor from ExtensionRegistry or from GeneratedExtension.getDescriptor

ExtensionRegistry usage.

2009-07-30 Thread Brice Figureau
Hi, I'm just starting using Protocol Buffers for Java for a network protocol. Here is how I designed my proto file: request.proto: message Message { enum Type { AUTH = 100; CHAT = 101; ... } required Type type = 1;