*/
package org.opendaylight.yangtools.yang.parser.spi.meta;
+import java.util.stream.Stream;
import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
+/**
+ * An entity capable of creating {@link DeclaredStatement} and {@link EffectiveStatement} instances for a particular
+ * type. This interface is usually realized as an implementation-specific combination with {@link StatementSupport}.
+ *
+ * @param <A> Argument type
+ * @param <D> Declared Statement representation
+ * @param <E> Effective Statement representation
+ */
public interface StatementFactory<A, D extends DeclaredStatement<A>, E extends EffectiveStatement<A, D>> {
/**
* Create a {@link DeclaredStatement} for specified context.
/**
* Create a {@link EffectiveStatement} for specified context.
*
- * @param ctx Statement context
- * @return An effective statement instance.
+ * @param stmt Effective capture of this statement's significant state
+ * @return An effective statement instance
*/
- @NonNull E createEffective(@NonNull StmtContext<A, D, E> ctx);
+ @NonNull E createEffective(EffectiveStmtCtx.@NonNull Current<A, D> stmt,
+ Stream<? extends StmtContext<?, ?, ?>> declaredSubstatements,
+ Stream<? extends StmtContext<?, ?, ?>> effectiveSubstatements);
}