I assume you want to use generated class. In that case, you can keep a map
from Descriptor to the default instance. Then when you get the
FieldDescriptor, you can get the containing type Descriptor; then look up
the map the get the default instance, and call newBuilderForType() to get
the generated builder.

On Sat, Nov 5, 2011 at 12:28 AM, Ori <ori.schwa...@gmail.com> wrote:

> I'd like to create and populate a Message given only a FieldDescriptor
> from that message.
>
> Is it possible to create a new Builder without knowing the Message's
> type in advance? I don't want to use DynamicMessage, I want to create
> the Builder implementation for the descriptor's containingType.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To post to this group, send email to protobuf@googlegroups.com.
> To unsubscribe from this group, send email to
> protobuf+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/protobuf?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to