[MDSAL-469] Add DataObject.toBuilder() utility method Created: 03/Sep/19 Updated: 03/Aug/20 |
|
| Status: | Confirmed |
| Project: | mdsal |
| Component/s: | Binding codegen |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Low |
| Reporter: | Robert Varga | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
Since we have default methods available, we can make conversion of DataObject to a corresponding shallowly-copied builder a utility method, which will redirect to the appropriate Builder copy-constructor. For an interface Foo, add the following method: default @NonNull FooBuilder toBuilder() { return new FooBuilder(this); } |