asereda-gs commented on pull request #2531:
URL: https://github.com/apache/calcite/pull/2531#issuecomment-925188499


   > Does `Immutables` have a mode where it generates copy-on-write beans (with 
`with` methods) as opposed to builders? That's the crux of the problem here.
   
   Yes. ImmutableBean will have `with` method  which acts as copy-on-write.
   
   > Is there anything in `Immutables` that converts a bean into a builder 
(with the same property values)? That will be necessary.
   
   One can use `from()` method of a builder:
   
   ```java
   ImmutableBean.builder()
       .from(other) // merges attribute value into builder
       .value("foo")
      .build();
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to