2 * Copyright (c) 2017 Pantheon Technologies, s.r.o. 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 com.google.common.annotations.Beta;
11 import com.google.common.collect.ForwardingObject;
12 import java.util.Collection;
16 * Utility forwarding implementation of {@link EffectiveStatement} contract. This class is useful for implementing
19 * @author Robert Varga
21 * @param <A> Argument type
22 * @param <D> Declared Statement representation
23 * @param <E> Effective Statement representation
26 public abstract class ForwardingEffectiveStatement<A, D extends DeclaredStatement<A>,
27 E extends EffectiveStatement<A, D>> extends ForwardingObject implements EffectiveStatement<A, D> {
30 protected abstract E delegate();
34 public D getDeclared() {
35 return delegate().getDeclared();
39 public <K, V, N extends IdentifierNamespace<K, V>> V get(final Class<N> namespace, final K identifier) {
40 return delegate().get(namespace, identifier);
44 public <K, V, N extends IdentifierNamespace<K, V>> Map<K, V> getAll(final Class<N> namespace) {
45 return delegate().getAll(namespace);
49 public Collection<? extends EffectiveStatement<?, ?>> effectiveSubstatements() {
50 return delegate().effectiveSubstatements();
54 public StatementDefinition statementDefinition() {
55 return delegate().statementDefinition();
60 return delegate().argument();
64 public StatementSource getStatementSource() {
65 return delegate().getStatementSource();