Remove EffectiveAugmentationSchema.create()
[yangtools.git] / model / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / api / meta / ModelStatement.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 org.eclipse.jdt.annotation.NonNull;
11 import org.opendaylight.yangtools.yang.common.Empty;
12
13 /**
14  * Model statement. There are two base types of model statements:
15  * <ul>
16  *   <li>{@link DeclaredStatement} - Statement representation as was defined in original source. This representation
17  *       could be used during computation of effective model or during transforming YANG model from one serialization
18  *       format to another.
19  *   </li>
20  *   <li>{@link EffectiveStatement} - Representation of effective statement - this statement may be different from
21  *       declared, in such way, that it contains additional substatements, provides access to model namespaces. Some
22  *       effective statements may be not directly declared in YANG source, but could be inferred by semantic processing
23  *       of other statements (for example {@code uses}, {@code augment} and others).
24  *   </li>
25  * </ul>
26  *
27  * @param <A> Argument type ({@link Empty} if statement does not have argument.)
28  */
29 // FIXME: sealed interface when we have JDK17+
30 public interface ModelStatement<A> {
31     /**
32      * Statement Definition of this statement.
33      *
34      * @return definition of this statement.
35      */
36     @NonNull StatementDefinition statementDefinition();
37
38     /**
39      * Returns statement argument.
40      *
41      * @return statement argument.
42      */
43     @NonNull A argument();
44 }