X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=yang%2Fyang-parser-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fyangtools%2Fyang%2Fparser%2Fspi%2Fmeta%2FStatementFactory.java;h=f929529c63277cefa8ac569d23af7d34606800e4;hb=88aeb1cd912d37fcadf671b622fece9a01297e90;hp=458a188ae18ac67852cb692666b09b7bc7cd6a59;hpb=c8668229ad6e73d5ae03a52f4b87e8e4d2a67c6e;p=yangtools.git diff --git a/yang/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StatementFactory.java b/yang/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StatementFactory.java index 458a188ae1..f929529c63 100644 --- a/yang/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StatementFactory.java +++ b/yang/yang-parser-spi/src/main/java/org/opendaylight/yangtools/yang/parser/spi/meta/StatementFactory.java @@ -7,10 +7,19 @@ */ 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 Argument type + * @param Declared Statement representation + * @param Effective Statement representation + */ public interface StatementFactory, E extends EffectiveStatement> { /** * Create a {@link DeclaredStatement} for specified context. @@ -23,8 +32,10 @@ public interface StatementFactory, E extends E /** * 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 ctx); + @NonNull E createEffective(EffectiveStmtCtx.@NonNull Current stmt, + Stream> declaredSubstatements, + Stream> effectiveSubstatements); }