[YANGTOOLS-653] Add immutable implementation of yang.model.api Created: 25/Aug/16 Updated: 10/Apr/22 Resolved: 22/Dec/16 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| Issue Links: |
|
||||||||
| External issue ID: | 6533 | ||||||||
| Description |
|
In order to allow semantic serialization of SchemaContext, we need to have an implementation of the interfaces defined in yang.model.api, so that deserialization can easily instantiate such objects. Simplest way to achieve this goal is to use immutables.org to auto-generate immutable implementations with builders – this only requires couple of annotations of the defined interfaces and adding an annotation processor. |
| Comments |
| Comment by Robert Varga [ 25/Aug/16 ] |
|
preliminary patch: https://git.opendaylight.org/gerrit/44657 |
| Comment by Michael Vorburger [ 25/Aug/16 ] |
|
> use immutables.org to auto-generate immutable implementations with builders – this only requires couple of annotations of the defined interfaces and adding an annotation processor. nice, I like http://immutables.github.io - we should use this more. Hadn't seen that yet, but have played with https://github.com/google/auto, who's https://github.com/google/auto/blob/master/value/userguide/index.md seems to be quite similar. |
| Comment by Robert Varga [ 25/Aug/16 ] |
|
Well, one problem I would like to solve is to not have the implementation packaged in the api bundle itself, as that increases footprint. |
| Comment by Robert Varga [ 19/Dec/16 ] |
|
Patch updated to create a new artifact and generate the implementations there. |