YANGTOOLS-706: Split out yang-parser-rfc7950
[yangtools.git] / yang / yang-parser-rfc7950 / src / main / java / org / opendaylight / yangtools / yang / parser / rfc7950 / stmt / type / InstanceIdentifierSpecificationImpl.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.type;
9
10 import javax.annotation.Nonnull;
11 import org.opendaylight.yangtools.yang.model.api.stmt.RequireInstanceStatement;
12 import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.InstanceIdentifierSpecification;
13 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
14 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
15
16 final class InstanceIdentifierSpecificationImpl extends AbstractDeclaredStatement<String>
17         implements InstanceIdentifierSpecification {
18     InstanceIdentifierSpecificationImpl(final StmtContext<String, InstanceIdentifierSpecification, ?> ctx) {
19         super(ctx);
20     }
21
22     @Nonnull
23     @Override
24     public String getName() {
25         return argument();
26     }
27
28     @Override
29     public RequireInstanceStatement getRequireInstance() {
30         return firstDeclared(RequireInstanceStatement.class);
31     }
32 }