Remove AugmentationSchemaNode.getOriginalDefinition()
[yangtools.git] / parser / yang-parser-spi / src / main / java / org / opendaylight / yangtools / yang / parser / spi / meta / EffectiveStmtCtx.java
index 96f1c8b153397245ee45b209e6d62f8db9c1440c..1c4df647353661b3cf5d98a3138adea064146abe 100644 (file)
@@ -110,14 +110,6 @@ public interface EffectiveStmtCtx extends CommonStmtCtx, StmtContextCompat, Immu
 
         @NonNull QName moduleName();
 
-        @Deprecated(since = "7.0.9", forRemoval = true)
-        @Nullable EffectiveStatement<?, ?> original();
-
-        @Deprecated(since = "7.0.9", forRemoval = true)
-        default <T> @Nullable T original(final @NonNull Class<T> type) {
-            return type.cast(original());
-        }
-
         // FIXME: 8.0.0: this method should be moved to stmt.type in some shape or form
         @NonNull QName argumentAsTypeQName();
 
@@ -131,4 +123,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();
+        }
+    }
 }