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.notification;
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.NotificationDefinition;
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.NotificationEffectiveStatement;
21 import org.opendaylight.yangtools.yang.model.api.stmt.NotificationStatement;
22 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractDeclaredEffectiveStatement.DefaultWithDataTree.WithSubstatements;
23 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementMixins.AugmentationTargetMixin;
24 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementMixins.CopyableMixin;
25 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementMixins.DataNodeContainerMixin;
26 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementMixins.MustConstraintMixin;
27 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementMixins.SchemaNodeMixin;
28 import org.opendaylight.yangtools.yang.parser.spi.source.StatementSourceReference;
30 final class NotificationEffectiveStatementImpl
31 extends WithSubstatements<QName, NotificationStatement, NotificationEffectiveStatement>
32 implements NotificationDefinition, NotificationEffectiveStatement,
33 SchemaNodeMixin<QName, NotificationStatement>, DataNodeContainerMixin<QName, NotificationStatement>,
34 AugmentationTargetMixin<QName, NotificationStatement>, CopyableMixin<QName, NotificationStatement>,
35 MustConstraintMixin<QName, NotificationStatement> {
37 private final @NonNull SchemaPath path;
38 private final int flags;
40 NotificationEffectiveStatementImpl(final NotificationStatement declared,
41 final ImmutableList<? extends EffectiveStatement<?, ?>> substatements, final StatementSourceReference ref,
42 final int flags, final SchemaPath path) {
43 super(declared, substatements, ref);
44 this.path = requireNonNull(path);
49 public @NonNull QName argument() {
54 public Optional<DataSchemaNode> findDataChildByName(final QName name) {
55 return findDataSchemaNode(name);
65 public SchemaPath getPath() {
70 public NotificationEffectiveStatement asEffectiveStatement() {
75 public String toString() {
76 return NotificationEffectiveStatementImpl.class.getSimpleName() + "[qname=" + getQName() + ", path=" + path