/* * Copyright (c) 2017 Pantheon Technologies, s.r.o. and others. All rights reserved. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html */ package org.opendaylight.yangtools.yang.model.api.meta; import com.google.common.annotations.Beta; import com.google.common.collect.ForwardingObject; import java.util.Collection; import java.util.Map; import java.util.Optional; /** * Utility forwarding implementation of {@link EffectiveStatement} contract. This class is useful for implementing * wrapped statements. * * @author Robert Varga * * @param Argument type * @param Declared Statement representation * @param Effective Statement representation */ @Beta public abstract class ForwardingEffectiveStatement, E extends EffectiveStatement> extends ForwardingObject implements EffectiveStatement { @Override protected abstract E delegate(); @Override public D getDeclared() { return delegate().getDeclared(); } @Override public > Optional get(final Class namespace, final K identifier) { return delegate().get(namespace, identifier); } @Override public > Map getAll(final Class namespace) { return delegate().getAll(namespace); } @Override public Collection> effectiveSubstatements() { return delegate().effectiveSubstatements(); } @Override public StatementDefinition statementDefinition() { return delegate().statementDefinition(); } @Override public A argument() { return delegate().argument(); } @Override public StatementSource getStatementSource() { return delegate().getStatementSource(); } }