Propagate @NonNull collection annotations
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / GroupingDefinition.java
index 629fad57e74788a31df0c977d13fa5ec5eb0a55e..730b168df0264730452abdfb98f4a98f41891a4e 100644 (file)
@@ -7,23 +7,21 @@
  */
 package org.opendaylight.yangtools.yang.model.api;
 
+import org.opendaylight.yangtools.yang.model.api.stmt.GroupingEffectiveStatement;
+
 /**
  * Interface describing YANG 'grouping' statement.
+ *
  * <p>
  * It is used to define a reusable block of nodes, which may be used locally in
- * the module, in modules that include it, and by other modules that import from
- * it.
- * </p>
+ * the module, in modules that include it, and by other modules that import from it.
+ *
+ * <p>
+ * Note: this interface extends {@link AddedByUsesAware}, but this contradicts the javadoc of {@link #isAddedByUses()},
+ *       as groupings can never be encountered in 'data schema node' context. It is their children, which are data
+ *       schema node, but those really are instantiated and typically differ in {@link #getQName()}'s namespace.
  */
-public interface GroupingDefinition extends DataNodeContainer, SchemaNode, NotificationNodeContainer, ActionNodeContainer {
-
-    /**
-     * Returns <code>true</code> if the data node was added by uses statement,
-     * otherwise returns <code>false</code>
-     *
-     * @return <code>true</code> if the data node was added by uses statement,
-     *         otherwise returns <code>false</code>
-     */
-    boolean isAddedByUses();
+public interface GroupingDefinition extends DataNodeContainer, SchemaNode, NotificationNodeContainer,
+       ActionNodeContainer, AddedByUsesAware, EffectiveStatementEquivalent<GroupingEffectiveStatement> {
 
 }