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.output;
10 import static java.util.Objects.requireNonNull;
12 import com.google.common.collect.ImmutableList;
13 import org.eclipse.jdt.annotation.NonNull;
14 import org.opendaylight.yangtools.concepts.Immutable;
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.OutputSchemaNode;
18 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
19 import org.opendaylight.yangtools.yang.model.api.stmt.OutputEffectiveStatement;
20 import org.opendaylight.yangtools.yang.model.api.stmt.OutputStatement;
21 import org.opendaylight.yangtools.yang.model.spi.meta.AbstractDeclaredEffectiveStatement.DefaultWithDataTree.WithSubstatements;
22 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementMixins.OperationContainerMixin;
24 final class DeclaredOutputEffectiveStatement extends WithSubstatements<QName, OutputStatement, OutputEffectiveStatement>
25 implements OutputEffectiveStatement, OutputSchemaNode, OperationContainerMixin<OutputStatement> {
26 private final @NonNull Immutable path;
27 private final int flags;
29 DeclaredOutputEffectiveStatement(final OutputStatement declared,
30 final ImmutableList<? extends EffectiveStatement<?, ?>> substatements, final Immutable path,
32 super(declared, substatements);
33 this.path = requireNonNull(path);
37 DeclaredOutputEffectiveStatement(final DeclaredOutputEffectiveStatement original, final Immutable path,
40 this.path = requireNonNull(path);
45 public Immutable pathObject() {
55 public DataSchemaNode dataChildByName(final QName name) {
56 return dataSchemaNode(name);
60 public OutputEffectiveStatement asEffectiveStatement() {
65 public String toString() {
66 return defaultToString();