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.input;
10 import static java.util.Objects.requireNonNull;
12 import com.google.common.collect.ImmutableList;
13 import java.util.Optional;
14 import org.eclipse.jdt.annotation.NonNull;
15 import org.opendaylight.yangtools.yang.common.QName;
16 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
17 import org.opendaylight.yangtools.yang.model.api.InputSchemaNode;
18 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
19 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
20 import org.opendaylight.yangtools.yang.model.api.stmt.InputEffectiveStatement;
21 import org.opendaylight.yangtools.yang.model.api.stmt.InputStatement;
22 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractDeclaredEffectiveStatement.DefaultWithDataTree.WithSubstatements;
23 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementMixins.OperationContainerMixin;
25 final class DeclaredInputEffectiveStatement extends WithSubstatements<QName, InputStatement, InputEffectiveStatement>
26 implements InputEffectiveStatement, InputSchemaNode, OperationContainerMixin<InputStatement> {
27 private final @NonNull SchemaPath path;
28 private final int flags;
30 DeclaredInputEffectiveStatement(final int flags, final InputStatement declared,
31 final ImmutableList<? extends EffectiveStatement<?, ?>> substatements, final SchemaPath path) {
32 super(declared, substatements);
34 this.path = requireNonNull(path);
39 public SchemaPath getPath() {
49 public Optional<DataSchemaNode> findDataChildByName(final QName name) {
50 return findDataSchemaNode(name);
54 public InputEffectiveStatement asEffectiveStatement() {
59 public String toString() {
60 return defaultToString();