Reformulate StatementContextFactory.createEffective()
[yangtools.git] / yang / rfc6643-parser-support / src / main / java / org / opendaylight / yangtools / rfc6643 / parser / ImpliedEffectiveStatementImpl.java
index b3dd587a9edbbac07e42fe0a1ba02741676916a7..bf687143395e9b2de98ca3254b710b0b9fd81710 100644 (file)
@@ -16,18 +16,17 @@ import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.UnknownEffectiveStatementBase;
-import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
+import org.opendaylight.yangtools.yang.parser.spi.meta.EffectiveStmtCtx.Current;
 
 final class ImpliedEffectiveStatementImpl extends UnknownEffectiveStatementBase<String, ImpliedStatement>
         implements ImpliedEffectiveStatement, ImpliedSchemaNode {
 
     private final SchemaPath path;
 
-    ImpliedEffectiveStatementImpl(final ImpliedStatement declared,
-            final ImmutableList<? extends EffectiveStatement<?, ?>> substatements,
-            final StmtContext<String, ImpliedStatement, ?> ctx) {
-        super(ctx.getStatementArgument(), declared, substatements, ctx);
-        path = ctx.coerceParentContext().getSchemaPath().get().createChild(getNodeType());
+    ImpliedEffectiveStatementImpl(final Current<String, ImpliedStatement> stmt,
+            final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
+        super(stmt, substatements);
+        path = stmt.getParent().getSchemaPath().createChild(getNodeType());
     }
 
     @Override