Push FIXMEs out
[yangtools.git] / yang / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / stmt / BaseStatementSupport.java
index 3cab48caee0b6cf1560ad2828fbbdab45d867947..8a149087e9cfc5fa0dfea32afb8ad49bb345e3ef 100644 (file)
@@ -54,7 +54,7 @@ public abstract class BaseStatementSupport<A, D extends DeclaredStatement<A>,
     protected abstract @NonNull D createEmptyDeclared(@NonNull StmtContext<A, D, ?> ctx);
 
     @Override
-    public final E createEffective(final StmtContext<A, D, E> ctx) {
+    public E createEffective(final StmtContext<A, D, E> ctx) {
         final D declared = ctx.buildDeclared();
         final ImmutableList<? extends EffectiveStatement<?, ?>> substatements =
                 buildEffectiveSubstatements(ctx, statementsToBuild(ctx, declaredSubstatements(ctx)));
@@ -91,7 +91,8 @@ public abstract class BaseStatementSupport<A, D extends DeclaredStatement<A>,
     }
 
     protected static final <A, E extends EffectiveStatement<A, ?>> A findFirstArgument(
-            final ImmutableList<? extends EffectiveStatement<?, ?>> statements, final Class<E> type, final A defValue) {
+            final ImmutableList<? extends EffectiveStatement<?, ?>> statements, final Class<@NonNull E> type,
+                    final A defValue) {
         final @Nullable E stmt = findFirstStatement(statements, type);
         return stmt != null ? stmt.argument() : defValue;
     }
@@ -109,11 +110,6 @@ public abstract class BaseStatementSupport<A, D extends DeclaredStatement<A>,
         return defaultBuildEffectiveSubstatements(substatements);
     }
 
-    static final ImmutableList<? extends EffectiveStatement<?, ?>> buildEffectiveSubstatements(
-            final StmtContext<?, ?, ?> ctx) {
-        return defaultBuildEffectiveSubstatements(declaredSubstatements(ctx));
-    }
-
     private static ImmutableList<? extends EffectiveStatement<?, ?>> defaultBuildEffectiveSubstatements(
             final List<? extends StmtContext<?, ?, ?>> substatements) {
         return substatements.stream()
@@ -122,7 +118,7 @@ public abstract class BaseStatementSupport<A, D extends DeclaredStatement<A>,
                 .collect(ImmutableList.toImmutableList());
     }
 
-    static final @NonNull List<StmtContext<?, ?, ?>> declaredSubstatements(final StmtContext<?, ?, ?> ctx) {
+    private static @NonNull List<StmtContext<?, ?, ?>> declaredSubstatements(final StmtContext<?, ?, ?> ctx) {
         /*
          * This dance is required to ensure that effects of 'uses' nodes are applied in the same order as
          * the statements were defined -- i.e. if we have something like this:
@@ -147,7 +143,7 @@ public abstract class BaseStatementSupport<A, D extends DeclaredStatement<A>,
          * The reactor would first inline 'uses baz' as that definition is the first one completely resolved and then
          * inline 'uses bar'. Here we are iterating in declaration order re-inline the statements.
          *
-         * FIXME: 6.0.0: this really should be handled by UsesStatementSupport such that 'uses baz' would have a
+         * FIXME: 7.0.0: this really should be handled by UsesStatementSupport such that 'uses baz' would have a
          *               prerequisite of a resolved 'uses bar'.
          */
         final List<StmtContext<?, ?, ?>> substatementsInit = new ArrayList<>();