1564797e7e51908819449b7fad3260030120a627
[mdsal.git] / binding / mdsal-binding-runtime-spi / src / main / java / org / opendaylight / mdsal / binding / runtime / spi / ForwardingModuleInfoSnapshot.java
1 /*
2  * Copyright (c) 2020 PANTHEON.tech, s.r.o. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.mdsal.binding.runtime.spi;
9
10 import com.google.common.annotations.Beta;
11 import com.google.common.collect.ForwardingObject;
12 import com.google.common.util.concurrent.ListenableFuture;
13 import org.eclipse.jdt.annotation.NonNull;
14 import org.opendaylight.mdsal.binding.runtime.api.ModuleInfoSnapshot;
15 import org.opendaylight.yangtools.yang.model.api.EffectiveModelContext;
16 import org.opendaylight.yangtools.yang.model.api.source.SourceIdentifier;
17 import org.opendaylight.yangtools.yang.model.api.source.YangTextSource;
18
19 @Beta
20 public abstract class ForwardingModuleInfoSnapshot extends ForwardingObject implements ModuleInfoSnapshot {
21     @Override
22     protected abstract ModuleInfoSnapshot delegate();
23
24     @Override
25     public <T> Class<T> loadClass(final String fullyQualifiedName) throws ClassNotFoundException {
26         return delegate().loadClass(fullyQualifiedName);
27     }
28
29     @Override
30     public @NonNull EffectiveModelContext modelContext() {
31         return delegate().modelContext();
32     }
33
34     @Override
35     public ListenableFuture<? extends YangTextSource> getSource(final SourceIdentifier sourceIdentifier) {
36         return delegate().getSource(sourceIdentifier);
37     }
38 }