[YANGTOOLS-1507] Add an immediate YangTextSchemaSource Created: 03/May/23 Updated: 12/May/23 Resolved: 12/May/23 |
|
| Status: | Resolved |
| Project: | yangtools |
| Component/s: | parser |
| Affects Version/s: | None |
| Fix Version/s: | 11.0.0 |
| Type: | Improvement | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
We have downstreams who are caching YangTextSchemaSource content as a constant byte[]. Add ImmediateYangTextSchemaSource, which holds a byte[], possibly with a symbolic name, which does all the (mediately) heavy lifting. While we are at it, the requirement to override addToStringAttributes() in both Yang and Yin text schema sources seems excessive: we provide the identifier by default. Make this method non-abstract, so that users are not required to provide this implementation. This necessitates updating the calling convention, which is a bit of pain. To make up some bonus points, configure ToStringHelper to ignore null values. |