All Superinterfaces:
CompositeRuntimeType, GeneratedRuntimeType, Identifiable<org.opendaylight.yangtools.binding.model.api.JavaTypeName>, Immutable, RuntimeType, RuntimeTypeContainer

public interface GroupingRuntimeType extends CompositeRuntimeType
A RuntimeType associated with a grouping statement.
  • Method Details

    • statement

      Description copied from interface: RuntimeType
      Return the EffectiveStatement associated with this run-time type.
      Specified by:
      statement in interface RuntimeType
      Returns:
      Effective statement
    • instantiations

      default @NonNull List<CompositeRuntimeType> instantiations()
      Return the set of all concrete data tree instantiations of this grouping. This is necessary to completely resolve type information for leafrefs.

      As an example, consider GroupingRuntimeType of grouping baz and it's instantiations roots container one and container two define 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 baz compile-time analysis cannot definitely determine the return type of getBaz() and must fall back to Object.

      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 for one and two. We can then use this information to know that getBaz() can either be a String or an Uint32 and 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 for instantiations(). This method's return, unlike instantiations() can contain other GroupingRuntimeTypes.
      Returns:
      Direct users of this grouping