Interface GroupingRuntimeType
- All Superinterfaces:
CompositeRuntimeType,GeneratedRuntimeType,Identifiable<org.opendaylight.yangtools.binding.model.api.JavaTypeName>,Immutable,RuntimeType,RuntimeTypeContainer
A
RuntimeType associated with a grouping statement.-
Method Summary
Modifier and TypeMethodDescription@NonNull List<CompositeRuntimeType> Support method forinstantiations().default @NonNull List<CompositeRuntimeType> Return the set of all concrete data tree instantiations of thisgrouping.Return theEffectiveStatementassociated with this run-time type.Methods inherited from interface org.opendaylight.yangtools.binding.runtime.api.GeneratedRuntimeType
getIdentifier, javaTypeMethods inherited from interface org.opendaylight.yangtools.binding.runtime.api.RuntimeTypeContainer
bindingChild, bindingChild, schemaTreeChild
-
Method Details
-
statement
GroupingEffectiveStatement statement()Description copied from interface:RuntimeTypeReturn theEffectiveStatementassociated with this run-time type.- Specified by:
statementin interfaceRuntimeType- Returns:
- Effective statement
-
instantiations
Return the set of all concrete data tree instantiations of thisgrouping. This is necessary to completely resolve type information forleafrefs.As an example, consider
GroupingRuntimeTypeofgrouping bazand it's instantiations rootscontainer oneandcontainer twodefine in these three models:module baz { namespace baz; prefix baz; grouping baz { leaf baz { type leafref { path "../bar"; } } } } module one { namespace one; prefix one; import baz { prefix baz; } container one { leaf bar { type string; } uses baz:baz; } } module two { namespace two; prefix two; import baz { prefix baz; } container two { leaf bar { type uint16; } uses baz:baz; } }Since these are separate modules, each of them can be part of its own compilation unit and therefore
grouping bazcompile-time analysis cannot definitely determine the return type ofgetBaz()and must fall back toObject.At run-time, though, we have a closed world, and therefore we can provide accurate information about instantiation sites: this method will return the
CompositeRuntimeTypes foroneandtwo. We can then use this information to know thatgetBaz()can either be aStringor anUint32and which type is appropriate at a particular point in YANG data tree.- Returns:
- The set instantiated
CompositeRuntimeTypes which use this grouping
-
directUsers
@NonNull List<CompositeRuntimeType> directUsers()Support method forinstantiations(). This method's return, unlikeinstantiations()can contain otherGroupingRuntimeTypes.- Returns:
- Direct users of this grouping
-