*/
package org.opendaylight.yangtools.yang.model.api.stmt;
-import javax.annotation.Nonnull;
+import static com.google.common.base.Verify.verifyNotNull;
+
+import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.common.QName;
-import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
/**
- *
* Statement that defines new data nodes.
- *
* One of container, leaf, leaf-list, list, choice, case,
- * augment, uses, and anyxml.
- *
- *
- * Defined in: https://tools.ietf.org/html/rfc6020#section-3
+ * augment, uses, anyxml and anydata.
*
+ * <p>
+ * Defined in: <a href="https://tools.ietf.org/html/rfc6020#section-3">RFC6020, Section 3</a>
*/
@Rfc6020AbnfRule("data-def-stmt")
-public interface DataDefinitionStatement extends DeclaredStatement<QName>, DocumentationGroup.WithStatus, ConditionalDataDefinition {
-
- @Nonnull QName getName();
-
+public interface DataDefinitionStatement extends DocumentedDeclaredStatement.WithStatus<QName>,
+ WhenStatementAwareDeclaredStatement<QName> {
+ default @NonNull QName getName() {
+ // FIXME: YANGTOOLS-908: verifyNotNull() should not be needed here
+ return verifyNotNull(argument());
+ }
}