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.model.api.meta;
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.opendaylight.yangtools.yang.common.Empty;
14 * Model statement. There are two base types of model statements:
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
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).
27 * @param <A> Argument type ({@link Empty} if statement does not have argument.)
29 // FIXME: sealed interface when we have JDK17+
30 public interface ModelStatement<A> {
32 * Statement Definition of this statement.
34 * @return definition of this statement.
36 @NonNull StatementDefinition statementDefinition();
39 * Returns statement argument.
41 * @return statement argument.
43 @NonNull A argument();