Add DataObject default methods
(MDSAL-470)
|
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | Binding codegen |
| Affects Version/s: | None |
| Fix Version/s: | 7.0.0 |
| Type: | Sub-task | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Ilya Igushev |
| Resolution: | Done | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
mdsal-binding-java-api-generator's InterfaceTemplate needs to generate a interface Foo extends DataObject { static int bindingHashCode(final @NonNull Foo obj) { // ... } } method from the contents of generated builder implementation objects. Those need to defer to bindingHashCode() for the actual computation. The method needs to be static, as for Augmentable interfaces it needs a different signature: interface Foo extends DataObject, Augmentatable<Foo> { static <T$$ extends Foo & AugmentationHolder<Foo>> int bindingHashCode(final @NonNull T$$ obj) { // ... } }
|