705573915fcf238dae7d8a72f2b76de7322f3966
[yangtools.git] /
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 org.eclipse.jdt.annotation.NonNullByDefault;
13 import org.eclipse.jdt.annotation.Nullable;
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 import org.opendaylight.yangtools.yang.model.repo.api.MissingSchemaSourceException;
19
20 @Beta
21 @NonNullByDefault
22 public abstract class ForwardingModuleInfoSnapshot extends ForwardingObject implements ModuleInfoSnapshot {
23     @Override
24     protected abstract ModuleInfoSnapshot delegate();
25
26     @Override
27     public <T> Class<T> loadClass(final String fullyQualifiedName) throws ClassNotFoundException {
28         return delegate().loadClass(fullyQualifiedName);
29     }
30
31     @Override
32     public EffectiveModelContext modelContext() {
33         return delegate().modelContext();
34     }
35
36     @Override
37     public @Nullable YangTextSource yangTextSource(final SourceIdentifier sourceId) {
38         return delegate().yangTextSource(sourceId);
39     }
40
41     @Override
42     public YangTextSource getYangTextSource(final SourceIdentifier sourceId) throws MissingSchemaSourceException {
43         return delegate().getYangTextSource(sourceId);
44     }
45 }