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;
24 import org.opendaylight.yangtools.yang.parser.spi.source.StatementSourceReference;
26 final class DeclaredInputEffectiveStatement extends WithSubstatements<QName, InputStatement, InputEffectiveStatement>
27 implements InputEffectiveStatement, InputSchemaNode, OperationContainerMixin<InputStatement> {
28 private final @NonNull SchemaPath path;
29 private final int flags;
31 DeclaredInputEffectiveStatement(final int flags, final InputStatement declared,
32 final ImmutableList<? extends EffectiveStatement<?, ?>> substatements, final StatementSourceReference ref,
33 final SchemaPath path) {
34 super(declared, substatements, ref);
36 this.path = requireNonNull(path);
41 public SchemaPath getPath() {
51 public Optional<DataSchemaNode> findDataChildByName(final QName name) {
52 return findDataSchemaNode(name);
56 public InputEffectiveStatement asEffectiveStatement() {
61 public String toString() {
62 return defaultToString();