Copy constructor implies copying object to the same type. You can use 
toBuilder() 
<https://developers.google.com/protocol-buffers/docs/reference/java/com/google/protobuf/MessageLite.html#toBuilder-->
 on 
the first object to get a builder that enables you to build the second 
object with the same values.

But when you say "convert one builder object ... to another builder object" 
do you mean a different type? That ordinarily is not possible.

On Saturday, July 4, 2020 at 5:11:02 AM UTC-7 [email protected] wrote:

>
> Recently started using gRPC -Protobuf so the question might be asked 
> earlier as well. Sorry if im repeating it here.
>
> I have to convert one protobuf object to another protobuf object in Java.
>
> Basically response construction. In normal Java world, we can have copy 
> constructor or BeanUtils copy properties to copy the nested set of objects 
> to destination. Similar to that Do i have any way to convert one builder 
> object of a protobuf to another builder object generated from protobuf file.
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/0038f753-2ebf-40f6-b7d7-d241d3af15b3n%40googlegroups.com.

Reply via email to