[YANGTOOLS-103] builder - copy contructor / fieldsFrom Created: 18/Mar/14 Updated: 10/Apr/22 Due: 18/Jul/14 Resolved: 21/Jul/14 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | ||
| Reporter: | Michal Rehak | Assignee: | Martin Vitez |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Linux |
||
| Issue Links: |
|
||||||||
| Description |
|
In case we need to copy fields (via method or contructor) from DataObject of the same type, then the copy contructor and fieldsFrom method should copy key, id and augmentations (full deep copy). |
| Comments |
| Comment by Tony Tkacik [ 28/Mar/14 ] |
|
From duplicate reported by Martin Sunal: Builder which is generated for list and container yang statements should contain a copy constructor where parameter is type of build() method. public class GroupBuilder { public GroupBuilder(Group group) { } public Group build() { return new GroupImpl(this); }} |
| Comment by Martin Vitez [ 16/Jul/14 ] |
|
Proposed patch: |