X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=parser%2Fyang-parser-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fparser%2Fspi%2Fmeta%2FEffectiveStmtCtx.java;h=1c4df647353661b3cf5d98a3138adea064146abe;hb=76102cf8eb2106610a3e087d2ae47097105b933a;hp=96f1c8b153397245ee45b209e6d62f8db9c1440c;hpb=5442bfd168f34d386e872817ba5ce612d75c80d8;p=yangtools.git diff --git a/parser/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/EffectiveStmtCtx.java b/parser/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/EffectiveStmtCtx.java index 96f1c8b153..1c4df64735 100644 --- a/parser/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/EffectiveStmtCtx.java +++ b/parser/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/EffectiveStmtCtx.java @@ -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 @Nullable T original(final @NonNull Class 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 > @NonNull StmtContext caerbannog(); } + + /** + * A restricted version of {@link Current}, which does not expose the raw argument or the declared statement. + * + * @param Argument type + * @param Class representing declared version of this statement + */ + @Beta + interface UndeclaredCurrent> extends Current { + @Deprecated + @Override + default String rawArgument() { + throw new UnsupportedOperationException(); + } + + @Deprecated + @Override + default D declared() { + throw new UnsupportedOperationException(); + } + } }