/* * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.identity; import java.util.Collection; import javax.annotation.Nonnull; import org.opendaylight.yangtools.yang.common.QName; import org.opendaylight.yangtools.yang.model.api.stmt.BaseStatement; import org.opendaylight.yangtools.yang.model.api.stmt.DescriptionStatement; import org.opendaylight.yangtools.yang.model.api.stmt.IdentityStatement; import org.opendaylight.yangtools.yang.model.api.stmt.IfFeatureStatement; import org.opendaylight.yangtools.yang.model.api.stmt.ReferenceStatement; import org.opendaylight.yangtools.yang.model.api.stmt.StatusStatement; import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement; import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext; final class IdentityStatementImpl extends AbstractDeclaredStatement implements IdentityStatement { IdentityStatementImpl(final StmtContext context) { super(context); } @Override public StatusStatement getStatus() { return firstDeclared(StatusStatement.class); } @Override public DescriptionStatement getDescription() { return firstDeclared(DescriptionStatement.class); } @Nonnull @Override public Collection getIfFeatures() { return allDeclared(IfFeatureStatement.class); } @Override public ReferenceStatement getReference() { return firstDeclared(ReferenceStatement.class); } @Nonnull @Override public Collection getBases() { return allDeclared(BaseStatement.class); } @Nonnull @Override public QName getName() { return argument(); } }