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.parser.rfc7950.stmt;
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
12 import org.opendaylight.yangtools.yang.model.api.meta.StatementDefinition;
13 import org.opendaylight.yangtools.yang.model.api.meta.StatementSource;
14 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
17 * A declared {@link EffectiveStatementBase}.
19 * @deprecated Use {@link AbstractDeclaredEffectiveStatement} and its subclasses instead.
21 @Deprecated(forRemoval = true)
22 // FIXME: 6.0.0: fold this into AbstractEffectiveDocumentedNodeWithStatus
23 public abstract class DeclaredEffectiveStatementBase<A, D extends DeclaredStatement<A>> extends
24 EffectiveStatementBase<A, D> {
26 private final @NonNull StatementSource statementSource;
27 private final A argument;
28 private final @NonNull D declaredInstance;
33 * @param ctx context of statement.
35 protected DeclaredEffectiveStatementBase(final StmtContext<A, D, ?> ctx) {
37 argument = ctx.getStatementArgument();
38 statementSource = ctx.getStatementSource();
39 declaredInstance = ctx.buildDeclared();
43 public final StatementDefinition statementDefinition() {
44 return declaredInstance.statementDefinition();
53 public final StatementSource getStatementSource() {
54 return statementSource;
58 public final D getDeclared() {
59 return declaredInstance;