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
17 * source. This representation could be used during computation of effective model
18 * or during transforming YANG model from one serialization format to other.
21 * {@link EffectiveStatement} - Representation of effective statement - this
22 * statement may be different from declared, in such way, that it contains additional
23 * substatements, provides access to model namespaces. Some effective statements may be not
24 * directly declared in YANG source, but could be inferred by semantic processing of
25 * other statements (eg. uses, augment).
29 * @param <A> Argument type ({@link Empty} if statement does not have argument.)
31 public interface ModelStatement<A> {
33 * Statement Definition of this statement.
35 * @return definition of this statement.
37 @NonNull StatementDefinition statementDefinition();
40 * Returns statement argument.
42 * @return statement argument.
44 @NonNull A argument();
47 * Returns statement source, which denotes if statement was
48 * explicitly declared in original model or inferred during
49 * semantic processing of model.
51 * @return statement source.
53 @NonNull StatementSource getStatementSource();