2f7fa56720e9154234f89a6985b6122d900d7a66
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / meta / StatementDefinition.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.yangtools.yang.model.api.meta;
9
10 import javax.annotation.Nonnull;
11 import javax.annotation.Nullable;
12 import org.opendaylight.yangtools.concepts.Immutable;
13 import org.opendaylight.yangtools.yang.common.QName;
14
15 /**
16  *
17  * Definition / model of YANG {@link DeclaredStatement} and {@link EffectiveStatement}.
18  *
19  * Statement concept is defined in RFC6020 section 6.3:
20  * <blockquote> A YANG
21  * module contains a sequence of statements. Each statement starts with a
22  * keyword, followed by zero or one argument
23  * </blockquote>
24  *
25  * Source: <a href="https://tools.ietf.org/html/rfc6020#section-6.3"> </a>
26  *
27  *
28  */
29 public interface StatementDefinition extends Immutable {
30
31     /**
32      *
33      * Returns name of the statement
34      *
35      * @return Name of the statement
36      */
37     @Nonnull
38     QName getStatementName();
39
40     /**
41      *
42      * Returns name of statement argument or null, if statement does not have
43      * argument.
44      *
45      * @return argument name or null, if statement does not take argument.
46      */
47     @Nullable
48     QName getArgumentName();
49
50     /**
51      *
52      * Returns class which represents declared version of statement associated
53      * with this definition.
54      *
55      * This class should be interface, which provides convenience access to
56      * declared substatements.
57      *
58      * @return class which represents declared version of statement associated
59      *         with this definition.
60      */
61     @Nonnull
62     Class<? extends DeclaredStatement<?>> getDeclaredRepresentationClass();
63
64     /**
65      *
66      * Returns class which represents derived behaviour from supplied statement.
67      *
68      * This class should be interface, which defines convenience access to
69      * statement properties, namespace items and substatements.
70      *
71      * @return class which represents effective version of statement associated
72      *         with this definition
73      */
74     @Nonnull
75     Class<? extends EffectiveStatement<?,?>> getEffectiveRepresentationClass();
76
77 }