Introduce DataNodeContainer.findDataChildByName()
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / AbstractEffectiveDocumentedNode.java
index 6ff829e21d35d96674c5b0c68a30b133775bf436..a2e62f20a0a316b0c0130c4d5d2ec7b21eba390b 100644 (file)
@@ -7,36 +7,27 @@
  */
 package org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective;
 
+import javax.annotation.Nonnull;
 import org.opendaylight.yangtools.yang.model.api.DocumentedNode;
 import org.opendaylight.yangtools.yang.model.api.Status;
 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 
 public abstract class AbstractEffectiveDocumentedNode<A, D extends DeclaredStatement<A>>
-        extends DeclaredEffectiveStatementBase<A, D> implements DocumentedNode {
+        extends DeclaredEffectiveStatementBase<A, D> implements DocumentedNode.WithStatus {
 
     private final String description;
     private final String reference;
     private final Status status;
 
-    protected AbstractEffectiveDocumentedNode(final StmtContext<A, D, ?> ctx) {
-        this(ctx, true);
-    }
-
     /**
      * Constructor.
      *
      * @param ctx
      *            context of statement.
-     * @param buildUnknownSubstatements
-     *            if it is false, the unknown substatements are omitted from
-     *            build of effective substatements till the call of either
-     *            effectiveSubstatements or getOmittedUnknownSubstatements
-     *            method of EffectiveStatementBase class. The main purpose of
-     *            this is to allow the build of recursive extension definitions.
      */
-    protected AbstractEffectiveDocumentedNode(final StmtContext<A, D, ?> ctx, boolean buildUnknownSubstatements) {
-        super(ctx, buildUnknownSubstatements);
+    protected AbstractEffectiveDocumentedNode(final StmtContext<A, D, ?> ctx) {
+        super(ctx);
 
         final DescriptionEffectiveStatementImpl descStmt = firstEffective(DescriptionEffectiveStatementImpl.class);
         if (descStmt != null) {
@@ -70,6 +61,7 @@ public abstract class AbstractEffectiveDocumentedNode<A, D extends DeclaredState
         return reference;
     }
 
+    @Nonnull
     @Override
     public final Status getStatus() {
         return status;