2 * Copyright (c) 2017 Pantheon Technologies, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.refine;
10 import org.opendaylight.yangtools.yang.model.api.YangStmtMapping;
11 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
12 import org.opendaylight.yangtools.yang.model.api.stmt.RefineStatement;
13 import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier;
14 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.ArgumentUtils;
15 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
16 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
18 abstract class AbstractRefineStatementSupport extends AbstractStatementSupport<SchemaNodeIdentifier, RefineStatement,
19 EffectiveStatement<SchemaNodeIdentifier, RefineStatement>> {
21 AbstractRefineStatementSupport() {
22 super(YangStmtMapping.REFINE);
26 public final SchemaNodeIdentifier parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
27 return ArgumentUtils.nodeIdentifierFromPath(ctx, value);
31 public final RefineStatement createDeclared(final StmtContext<SchemaNodeIdentifier, RefineStatement, ?> ctx) {
32 return new RefineStatementImpl(ctx);
36 public final EffectiveStatement<SchemaNodeIdentifier, RefineStatement> createEffective(
37 final StmtContext<SchemaNodeIdentifier, RefineStatement,
38 EffectiveStatement<SchemaNodeIdentifier, RefineStatement>> ctx) {
39 return new RefineEffectiveStatementImpl(ctx);