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.AbstractStatementSupport;
+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;
public final class AnyxmlSchemaLocationStatementSupport
- extends BaseStatementSupport<SchemaNodeIdentifier, AnyxmlSchemaLocationStatement,
+ extends AbstractStatementSupport<SchemaNodeIdentifier, AnyxmlSchemaLocationStatement,
AnyxmlSchemaLocationEffectiveStatement> {
private static final AnyxmlSchemaLocationStatementSupport INSTANCE =
new AnyxmlSchemaLocationStatementSupport(ANYXML_SCHEMA_LOCATION);
private final SubstatementValidator validator;
private AnyxmlSchemaLocationStatementSupport(final StatementDefinition definition) {
- super(definition);
+ super(definition, CopyPolicy.DECLARED_COPY);
validator = SubstatementValidator.builder(definition).build();
}
protected AnyxmlSchemaLocationStatement createDeclared(
final StmtContext<SchemaNodeIdentifier, AnyxmlSchemaLocationStatement, ?> ctx,
final ImmutableList<? extends DeclaredStatement<?>> substatements) {
- return new AnyxmlSchemaLocationStatementImpl(ctx, substatements);
+ return new AnyxmlSchemaLocationStatementImpl(ctx.getRawArgument(), ctx.getArgument(), substatements);
}
@Override
@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