Reformulate StatementContextFactory.createEffective()
[yangtools.git] / yang / odlext-parser-support / src / main / java / org / opendaylight / yangtools / odlext / parser / AnyxmlSchemaLocationStatementSupport.java
index 5ac95544cea3c171fcf0b7ef3eab0a5400aaef29..771a46b264a23b4dd42f5fe6a64e8d3c49416f7d 100644 (file)
@@ -18,6 +18,7 @@ import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
 import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier;
 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.ArgumentUtils;
 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.BaseStatementSupport;
+import org.opendaylight.yangtools.yang.parser.spi.meta.EffectiveStmtCtx.Current;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable;
 import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
@@ -72,16 +73,8 @@ public final class AnyxmlSchemaLocationStatementSupport
 
     @Override
     protected AnyxmlSchemaLocationEffectiveStatement createEffective(
-            final StmtContext<SchemaNodeIdentifier, AnyxmlSchemaLocationStatement,
-                AnyxmlSchemaLocationEffectiveStatement> ctx, final AnyxmlSchemaLocationStatement declared,
+            final Current<SchemaNodeIdentifier, AnyxmlSchemaLocationStatement> stmt,
             final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
-        return new AnyxmlSchemaLocationEffectiveStatementImpl(declared, substatements, ctx);
-    }
-
-    @Override
-    protected AnyxmlSchemaLocationEffectiveStatement createEmptyEffective(
-            final StmtContext<SchemaNodeIdentifier, AnyxmlSchemaLocationStatement,
-                AnyxmlSchemaLocationEffectiveStatement> ctx, final AnyxmlSchemaLocationStatement declared) {
-        return createEffective(ctx, declared, ImmutableList.of());
+        return new AnyxmlSchemaLocationEffectiveStatementImpl(stmt, substatements);
     }
 }
\ No newline at end of file