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 com.google.common.collect.ImmutableList;
11 import java.util.Optional;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
15 import org.opendaylight.yangtools.yang.model.api.NotificationDefinition;
16 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
17 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
18 import org.opendaylight.yangtools.yang.model.api.stmt.NotificationEffectiveStatement;
19 import org.opendaylight.yangtools.yang.model.api.stmt.NotificationStatement;
20 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.AbstractDeclaredEffectiveStatement.DefaultWithDataTree.WithSubstatements;
21 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementMixins.AugmentationTargetMixin;
22 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementMixins.CopyableMixin;
23 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementMixins.DataNodeContainerMixin;
24 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementMixins.MustConstraintMixin;
25 import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.EffectiveStatementMixins.SchemaNodeMixin;
26 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
28 final class NotificationEffectiveStatementImpl
29 extends WithSubstatements<QName, NotificationStatement, NotificationEffectiveStatement>
30 implements NotificationDefinition, NotificationEffectiveStatement,
31 SchemaNodeMixin<QName, NotificationStatement>, DataNodeContainerMixin<QName, NotificationStatement>,
32 AugmentationTargetMixin<QName, NotificationStatement>, CopyableMixin<QName, NotificationStatement>,
33 MustConstraintMixin<QName, NotificationStatement> {
35 private final @NonNull SchemaPath path;
36 private final int flags;
38 NotificationEffectiveStatementImpl(final NotificationStatement declared, final int flags,
39 final StmtContext<QName, NotificationStatement, NotificationEffectiveStatement> ctx,
40 final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
41 super(declared, ctx, substatements);
42 this.path = ctx.getSchemaPath().get();
47 public @NonNull QName argument() {
52 public Optional<DataSchemaNode> findDataChildByName(final QName name) {
53 return findDataSchemaNode(name);
62 public SchemaPath getPath() {
67 public String toString() {
68 return NotificationEffectiveStatementImpl.class.getSimpleName() + "[qname=" + getQName() + ", path=" + path