Retain grouping/uses instantiation vectors
We need the ability fo find all instantiations of a grouping for
closed-world analysis of BindingRuntimeTypes.
This analysis is need to determine, for example:
- possible types of 'type leafref's pointing outside a grouping,
to determine which Binding/DOM codecs are applicable
- YANG/Binding overload mapping, i.e. whether a 'container'
defined in a grouping is instantiated only once or multiple
types, to use a strongly-bound CodecDataObject it the former case
This patch exposes a GroupingRuntimeType.instantiations(), which exposes
exactly this information.
DefaultGroupingRuntimeType stores this information in the form of
a set of vectors, each pointing either to another grouping or to a
concrete instantiation.
GeneratorReactor collects this information sufficiently early so that it
can be also used to perform partial closed-world analysis during
compile-time.
JIRA: MDSAL-669
Change-Id: I2e21a6b93ce30d9bd1022be5747d44663b6198fc
Signed-off-by: Samuel Schneider <samuel.schneider@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>