Do you mean getting the sub-builders by passing the
Descriptor.FieldDescriptor for the field you want, like what you would do
for Message.Builder.setField()? This sounds like a reasonable feature
request, though to be honest I'm not familiar enough with the Java code to
know how difficult this would be.

On Wed, Nov 30, 2011 at 9:00 PM, Alex <[email protected]> wrote:

>
> Let's assume we have the following structure:
>
> message Alpha {
>
>   message Beta {
>
>     optional int32 mercury = 1;
>
>     optional int32 venus = 2;
>   }
>
>   optional int32 earth = 1;
>
>   optional Beta mars = 2;
> }
>
> The Java generated code allows to get a sub-builder for "mars" field from
> a builder for an Alpha message by calling
> Alpha.newBuilder().getMarsBuilder(). This is nice because I can keep
> builders for structured messages and update them as needed and build the
> Alpha message as needed, but still hold on to the big builder which I plan
> to update further.
>
> But I do not think there is a way to do this in a generic way, using
> Message.Builder interface. Is there any plan for something like this?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/protobuf/-/Y2ff3aqv72wJ.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to