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.rfc7950.stmt.bit;
10 import java.util.Collection;
11 import javax.annotation.Nonnull;
12 import org.opendaylight.yangtools.yang.common.QName;
13 import org.opendaylight.yangtools.yang.model.api.stmt.BitStatement;
14 import org.opendaylight.yangtools.yang.model.api.stmt.DescriptionStatement;
15 import org.opendaylight.yangtools.yang.model.api.stmt.IfFeatureStatement;
16 import org.opendaylight.yangtools.yang.model.api.stmt.PositionStatement;
17 import org.opendaylight.yangtools.yang.model.api.stmt.ReferenceStatement;
18 import org.opendaylight.yangtools.yang.model.api.stmt.StatusStatement;
19 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
20 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
22 final class BitStatementImpl extends AbstractDeclaredStatement<QName> implements BitStatement {
23 BitStatementImpl(final StmtContext<QName, BitStatement, ?> context) {
28 public StatusStatement getStatus() {
29 return firstDeclared(StatusStatement.class);
33 public DescriptionStatement getDescription() {
34 return firstDeclared(DescriptionStatement.class);
39 public Collection<? extends IfFeatureStatement> getIfFeatures() {
40 return allDeclared(IfFeatureStatement.class);
44 public ReferenceStatement getReference() {
45 return firstDeclared(ReferenceStatement.class);
50 public String getName() {
51 return argument().getLocalName();
55 public PositionStatement getPosition() {
56 return firstDeclared(PositionStatement.class);