Fix InvalidRangeConstraintException serializability
[yangtools.git] / yang / yang-parser-reactor / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / reactor / StatementContextBase.java
index d26a8e9adfe06e8877ec38113735d8dba1d0ab3c..fc83c28ed34a989744d3357356fc9f4dc0f73439 100644 (file)
@@ -358,9 +358,23 @@ public abstract class StatementContextBase<A, D extends DeclaredStatement<A>, E
         return factory.createEffective(ctx, ctx.streamDeclared(), ctx.streamEffective());
     }
 
-    abstract Stream<? extends StmtContext<?, ?, ?>> streamDeclared();
+    /**
+     * Return a stream of declared statements which can be built into an {@link EffectiveStatement}, as per
+     * {@link StmtContext#buildEffective()} contract.
+     *
+     * @return Stream of supported declared statements.
+     */
+    // FIXME: we really want to unify this with streamEffective(), under its name
+    abstract Stream<? extends @NonNull StmtContext<?, ?, ?>> streamDeclared();
 
-    abstract Stream<? extends StmtContext<?, ?, ?>> streamEffective();
+    /**
+     * Return a stream of inferred statements which can be built into an {@link EffectiveStatement}, as per
+     * {@link StmtContext#buildEffective()} contract.
+     *
+     * @return Stream of supported effective statements.
+     */
+    // FIXME: this method is currently a misnomer, but unifying with streamDeclared() would make this accurate again
+    abstract Stream<? extends @NonNull StmtContext<?, ?, ?>> streamEffective();
 
     @Override
     final boolean doTryToCompletePhase(final ModelProcessingPhase phase) {