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 javax.annotation.Nonnull;
11 import javax.annotation.Nullable;
12 import org.opendaylight.yangtools.concepts.Immutable;
13 import org.opendaylight.yangtools.yang.common.QName;
17 * Definition / model of YANG {@link DeclaredStatement} and {@link EffectiveStatement}.
19 * Statement concept is defined in RFC6020 section 6.3:
21 * module contains a sequence of statements. Each statement starts with a
22 * keyword, followed by zero or one argument
25 * Source: <a href="https://tools.ietf.org/html/rfc6020#section-6.3"> </a>
29 public interface StatementDefinition extends Immutable {
33 * Returns name of the statement
35 * @return Name of the statement
38 QName getStatementName();
42 * Returns name of statement argument or null, if statement does not have
45 * @return argument name or null, if statement does not take argument.
48 QName getArgumentName();
52 * Returns class which represents declared version of statement associated
53 * with this definition.
55 * This class should be interface, which provides convenience access to
56 * declared substatements.
58 * @return class which represents declared version of statement associated
59 * with this definition.
62 Class<? extends DeclaredStatement<?>> getDeclaredRepresentationClass();
66 * Returns class which represents derived behaviour from supplied statement.
68 * This class should be interface, which defines convenience access to
69 * statement properties, namespace items and substatements.
71 * @return class which represents effective version of statement associated
72 * with this definition
75 Class<? extends EffectiveStatement<?,?>> getEffectiveRepresentationClass();