2 * Copyright (c) 2015 Cisco Systems, Inc. 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.stmt.rfc6020;
10 import org.opendaylight.yangtools.yang.model.api.Deviation;
11 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.DeviateEffectiveStatementImpl;
13 import org.opendaylight.yangtools.yang.model.api.Rfc6020Mapping;
14 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
15 import org.opendaylight.yangtools.yang.model.api.stmt.DeviateStatement;
16 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
17 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
18 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
19 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
21 import javax.annotation.Nonnull;
23 public class DeviateStatementImpl extends AbstractDeclaredStatement<Deviation.Deviate> implements DeviateStatement {
25 protected DeviateStatementImpl(
26 StmtContext<Deviation.Deviate, DeviateStatement, ?> context) {
30 public static class Definition extends AbstractStatementSupport<Deviation.Deviate,DeviateStatement,EffectiveStatement<Deviation.Deviate,DeviateStatement>> {
33 super(Rfc6020Mapping.DEVIATE);
36 @Override public Deviation.Deviate parseArgumentValue(
37 StmtContext<?, ?, ?> ctx, String value) throws SourceException {
38 return Utils.parseDeviateFromString(value);
41 @Override public DeviateStatement createDeclared(
42 StmtContext<Deviation.Deviate, DeviateStatement, ?> ctx) {
43 return new DeviateStatementImpl(ctx);
46 @Override public EffectiveStatement<Deviation.Deviate, DeviateStatement> createEffective(
47 StmtContext<Deviation.Deviate, DeviateStatement, EffectiveStatement<Deviation.Deviate, DeviateStatement>> ctx) {
48 return new DeviateEffectiveStatementImpl(ctx);
54 public Deviation.Deviate getValue() {