[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);
}

Generated at Wed Feb 07 20:09:53 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.