But when you say "convert one builder object ... to another builder object" do you mean a different type? That ordinarily is not possible.
Yes Different Type. Now we are reading each property from source and setting it in destination and building destination Object. On Monday, 6 July 2020 07:57:58 UTC+5:30, [email protected] wrote: > > 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/c04abc12-90e7-4732-b15e-a43a5f87a663o%40googlegroups.com.
