Rework undeclared statement definition
[yangtools.git] / parser / yang-parser-spi / src / main / java / org / opendaylight / yangtools / yang / parser / spi / meta / EffectiveStmtCtx.java
index 2140b7dceb78c33e22bfa00e71ab4eb2fcc85c82..c98c9fa14dd90bb960238c34e6f0c0c0f98b5881 100644 (file)
@@ -126,4 +126,25 @@ public interface EffectiveStmtCtx extends CommonStmtCtx, StmtContextCompat, Immu
         @Deprecated
         <E extends EffectiveStatement<A, D>> @NonNull StmtContext<A, D, E> caerbannog();
     }
+
+    /**
+     * A restricted version of {@link Current}, which does not expose the raw argument or the declared statement.
+     *
+     * @param <A> Argument type
+     * @param <D> Class representing declared version of this statement
+     */
+    @Beta
+    interface UndeclaredCurrent<A, D extends DeclaredStatement<A>> extends Current<A, D> {
+        @Deprecated
+        @Override
+        default String rawArgument() {
+            throw new UnsupportedOperationException();
+        }
+
+        @Deprecated
+        @Override
+        default D declared() {
+            throw new UnsupportedOperationException();
+        }
+    }
 }