[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
Platform: All


Issue Links:
Blocks
blocks YANGTOOLS-429 Make SchemaContext serializable Resolved
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.

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