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%2FStmtContextUtils.java;h=b2b47ad8db369bee2e300232724ae50769a1d66c;hb=9f720af0c1cb38c2fbe48c7be03ace4d00ef2167;hp=74620a64822c55c9b7521f4167f3dbac2967027e;hpb=083ef931709258bed6e0fede5eea7fe3f63ddecc;p=yangtools.git diff --git a/parser/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StmtContextUtils.java b/parser/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StmtContextUtils.java index 74620a6482..b2b47ad8db 100644 --- a/parser/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StmtContextUtils.java +++ b/parser/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StmtContextUtils.java @@ -146,27 +146,6 @@ public final class StmtContextUtils { return null; } - /** - * Searches for the first substatement of the specified type in the specified statement context. - * First, it tries to find the substatement in the effective substatements of the statement context. - * If it was not found, then it proceeds to search in the declared substatements. If it still was not found, - * the method returns null. - * - * @param stmtContext statement context to search in - * @param declaredType substatement type to search for - * @param statement argument type - * @param declared statement type - * @return statement context that was searched for or null if was not found - * @deprecated Use {@link BoundStmtCtx#findSubstatementArgument(Class)} instead. - */ - @Deprecated(forRemoval = true) - public static > StmtContext findFirstSubstatement( - final StmtContext stmtContext, final Class declaredType) { - final StmtContext effectiveSubstatement = findFirstEffectiveSubstatement(stmtContext, declaredType); - return effectiveSubstatement != null ? effectiveSubstatement : findFirstDeclaredSubstatement(stmtContext, - declaredType); - } - public static > StmtContext findFirstDeclaredSubstatementOnSublevel( final StmtContext stmtContext, final Class declaredType, int sublevel) { for (final StmtContext subStmtContext : stmtContext.declaredSubstatements()) { @@ -201,6 +180,15 @@ public final class StmtContextUtils { return null; } + // FIXME: 8.0.0: This method goes back as far as YANGTOOLS-365, when we were build EffectiveStatements for + // unsupported YANG extensions. We are not doing that anymore, do we still need this method? Also, it + // is only used in augment support to disable mechanics on unknown nodes. + // + // It would seem we can move this method to AbstractAugmentStatementSupport at the very least, but + // also: augments are defined to operate on schema tree nodes, hence even if we have an + // UnknownStatement, but its EffectiveStatement projection supports SchemaTreeAwareEffectiveStatement + // we should operate normally -- the StatementSupport exposing such semantics is responsible for + // arranging the backend details. public static boolean isInExtensionBody(final StmtContext stmtCtx) { StmtContext current = stmtCtx;