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 public interface ModelStatement<A> {
31 * Statement Definition of this statement.
33 * @return definition of this statement.
35 @NonNull StatementDefinition statementDefinition();
38 * Returns statement argument.
40 * @return statement argument.
42 @NonNull A argument();
45 * Returns {@link StatementOrigin}, which denotes if statement was explicitly declared in original model or inferred
46 * during semantic processing of model.
48 * @return statement origin.
50 @NonNull StatementOrigin statementOrigin();