2 * Copyright (c) 2020 PANTHEON.tech, 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.mdsal.binding.runtime.spi;
10 import com.google.common.annotations.Beta;
11 import com.google.common.collect.ForwardingObject;
12 import org.opendaylight.mdsal.binding.model.api.JavaTypeName;
13 import org.opendaylight.mdsal.binding.runtime.api.ActionRuntimeType;
14 import org.opendaylight.mdsal.binding.runtime.api.AugmentRuntimeType;
15 import org.opendaylight.mdsal.binding.runtime.api.BindingRuntimeContext;
16 import org.opendaylight.mdsal.binding.runtime.api.BindingRuntimeTypes;
17 import org.opendaylight.mdsal.binding.runtime.api.CompositeRuntimeType;
18 import org.opendaylight.mdsal.binding.runtime.api.RuntimeType;
19 import org.opendaylight.yangtools.yang.binding.Action;
20 import org.opendaylight.yangtools.yang.binding.Augmentation;
21 import org.opendaylight.yangtools.yang.binding.BaseIdentity;
22 import org.opendaylight.yangtools.yang.binding.RpcInput;
23 import org.opendaylight.yangtools.yang.binding.RpcOutput;
24 import org.opendaylight.yangtools.yang.common.QName;
25 import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
28 public abstract class ForwardingBindingRuntimeContext extends ForwardingObject implements BindingRuntimeContext {
30 protected abstract BindingRuntimeContext delegate();
33 public BindingRuntimeTypes getTypes() {
34 return delegate().getTypes();
38 public <T extends Augmentation<?>> AugmentRuntimeType getAugmentationDefinition(final Class<T> augClass) {
39 return delegate().getAugmentationDefinition(augClass);
43 public CompositeRuntimeType getSchemaDefinition(final Class<?> cls) {
44 return delegate().getSchemaDefinition(cls);
48 public ActionRuntimeType getActionDefinition(final Class<? extends Action<?, ?, ?>> cls) {
49 return delegate().getActionDefinition(cls);
53 public RuntimeType getTypeWithSchema(final Class<?> type) {
54 return delegate().getTypeWithSchema(type);
58 public Class<?> getClassForSchema(final Absolute schema) {
59 return delegate().getClassForSchema(schema);
63 public Class<? extends BaseIdentity> getIdentityClass(final QName input) {
64 return delegate().getIdentityClass(input);
68 public <T> Class<T> loadClass(final JavaTypeName typeName) throws ClassNotFoundException {
69 return delegate().loadClass(typeName);
73 public Class<? extends RpcInput> getRpcInput(final QName rpcName) {
74 return delegate().getRpcInput(rpcName);
78 public Class<? extends RpcOutput> getRpcOutput(final QName rpcName) {
79 return delegate().getRpcOutput(rpcName);