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 org.eclipse.jdt.annotation.Nullable;
12 import org.opendaylight.yangtools.yang.common.QName;
13 import org.opendaylight.yangtools.yang.model.api.DataSchemaNode;
14 import org.opendaylight.yangtools.yang.model.api.NotificationDefinition;
15 import org.opendaylight.yangtools.yang.model.api.SchemaNodeDefaults;
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;
27 final class NotificationEffectiveStatementImpl
28 extends WithSubstatements<QName, NotificationStatement, NotificationEffectiveStatement>
29 implements NotificationDefinition, NotificationEffectiveStatement,
30 SchemaNodeMixin<QName, NotificationStatement>, DataNodeContainerMixin<QName, NotificationStatement>,
31 AugmentationTargetMixin<QName, NotificationStatement>, CopyableMixin<QName, NotificationStatement>,
32 MustConstraintMixin<QName, NotificationStatement> {
34 private final @Nullable SchemaPath path;
35 private final int flags;
37 NotificationEffectiveStatementImpl(final NotificationStatement declared,
38 final ImmutableList<? extends EffectiveStatement<?, ?>> substatements, final int flags,
39 final SchemaPath path) {
40 super(declared, substatements);
46 public QName argument() {
51 public DataSchemaNode dataChildByName(final QName name) {
52 return dataSchemaNode(name);
62 public SchemaPath getPath() {
63 return SchemaNodeDefaults.throwUnsupportedIfNull(this, path);
67 public NotificationEffectiveStatement asEffectiveStatement() {
72 public String toString() {
73 return NotificationEffectiveStatementImpl.class.getSimpleName() + "[qname=" + getQName() + ", path=" + path