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.stmt.PathStatement;
11 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
12 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
13 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
14 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
15 import org.opendaylight.yangtools.yang.model.api.Rfc6020Mapping;
16 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
17 import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement;
18 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.type.LeafrefSpecificationEffectiveStatementImpl;
20 public class LeafrefSpecificationImpl extends AbstractDeclaredStatement<String>
21 implements TypeStatement.LeafrefSpecification {
23 protected LeafrefSpecificationImpl(
24 StmtContext<String, TypeStatement.LeafrefSpecification, ?> context) {
28 public static class Definition
30 AbstractStatementSupport<String, TypeStatement.LeafrefSpecification, EffectiveStatement<String, TypeStatement.LeafrefSpecification>> {
33 super(Rfc6020Mapping.TYPE);
37 public String parseArgumentValue(StmtContext<?, ?, ?> ctx, String value)
38 throws SourceException {
43 public TypeStatement.LeafrefSpecification createDeclared(
44 StmtContext<String, TypeStatement.LeafrefSpecification, ?> ctx) {
45 return new LeafrefSpecificationImpl(ctx);
49 public EffectiveStatement<String, TypeStatement.LeafrefSpecification> createEffective(
50 StmtContext<String, TypeStatement.LeafrefSpecification, EffectiveStatement<String, TypeStatement.LeafrefSpecification>> ctx) {
51 return new LeafrefSpecificationEffectiveStatementImpl(ctx);
56 public String getName() {
61 public PathStatement getPath() {
62 return firstDeclared(PathStatement.class);