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.stmt.rfc6020.effective;
10 import com.google.common.base.Verify;
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;
16 public abstract class DeclaredEffectiveStatementBase<A, D extends DeclaredStatement<A>>
17 extends EffectiveStatementBase<A, D> {
19 private final D declaredInstance;
21 public DeclaredEffectiveStatementBase(final StmtContext<A, D, ?> ctx) {
23 declaredInstance = Verify.verifyNotNull(ctx.buildDeclared(), "Statement %s failed to build declared statement",
28 public final StatementDefinition statementDefinition() {
29 return declaredInstance.statementDefinition();
33 public final A argument() {
34 return declaredInstance.argument();
38 public final StatementSource getStatementSource() {
39 return declaredInstance.getStatementSource();
43 public final D getDeclared() {
44 return declaredInstance;