Cleanup checkstyle in yang-{data,model}-api
[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  * Definition / model of YANG {@link DeclaredStatement} and {@link EffectiveStatement}.
17  *
18  * <p>
19  * Statement concept is defined in RFC6020 section 6.3: <blockquote> A YANG
20  * module contains a sequence of statements. Each statement starts with a
21  * keyword, followed by zero or one argument </blockquote>
22  *
23  * <p>
24  * Source: <a href="https://tools.ietf.org/html/rfc6020#section-6.3"> </a>
25  */
26 public interface StatementDefinition extends Immutable {
27     /**
28      * Returns name of the statement.
29      *
30      * @return Name of the statement
31      */
32     @Nonnull
33     QName getStatementName();
34
35     /**
36      * Returns name of statement argument or null, if statement does not have
37      * argument.
38      *
39      * @return argument name or null, if statement does not take argument.
40      */
41     @Nullable
42     QName getArgumentName();
43
44     /**
45      * Returns class which represents declared version of statement associated
46      * with this definition.
47      *
48      * <p>
49      * This class should be interface, which provides convenience access to
50      * declared substatements.
51      *
52      * @return class which represents declared version of statement associated
53      *         with this definition.
54      */
55     @Nonnull
56     Class<? extends DeclaredStatement<?>> getDeclaredRepresentationClass();
57
58     /**
59      * Returns class which represents derived behaviour from supplied statement.
60      *
61      * <p>
62      * This class should be interface, which defines convenience access to
63      * statement properties, namespace items and substatements.
64      *
65      * @return class which represents effective version of statement associated
66      *         with this definition
67      */
68     @Nonnull
69     Class<? extends EffectiveStatement<?, ?>> getEffectiveRepresentationClass();
70
71     /**
72      * Returns true, if argument of statement is represented as value of yin
73      * element. If argument of statement is represented as argument of yin
74      * element, returns false.
75      *
76      * @return returns true, if statement argument is represented as value of
77      *         yin element, otherwise returns false.
78      */
79     boolean isArgumentYinElement();
80 }