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.RpcRuntimeType;
19 import org.opendaylight.mdsal.binding.runtime.api.RuntimeType;
20 import org.opendaylight.yangtools.yang.binding.Action;
21 import org.opendaylight.yangtools.yang.binding.Augmentation;
22 import org.opendaylight.yangtools.yang.binding.BaseIdentity;
23 import org.opendaylight.yangtools.yang.binding.Rpc;
24 import org.opendaylight.yangtools.yang.binding.RpcInput;
25 import org.opendaylight.yangtools.yang.binding.RpcOutput;
26 import org.opendaylight.yangtools.yang.common.QName;
27 import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier.Absolute;
30 public abstract class ForwardingBindingRuntimeContext extends ForwardingObject implements BindingRuntimeContext {
32 protected abstract BindingRuntimeContext delegate();
35 public BindingRuntimeTypes getTypes() {
36 return delegate().getTypes();
40 public <T extends Augmentation<?>> AugmentRuntimeType getAugmentationDefinition(final Class<T> augClass) {
41 return delegate().getAugmentationDefinition(augClass);
45 public CompositeRuntimeType getSchemaDefinition(final Class<?> cls) {
46 return delegate().getSchemaDefinition(cls);
50 public ActionRuntimeType getActionDefinition(final Class<? extends Action<?, ?, ?>> cls) {
51 return delegate().getActionDefinition(cls);
55 public RpcRuntimeType getRpcDefinition(final Class<? extends Rpc<?, ?>> cls) {
56 return delegate().getRpcDefinition(cls);
60 public RuntimeType getTypeWithSchema(final Class<?> type) {
61 return delegate().getTypeWithSchema(type);
65 public Class<?> getClassForSchema(final Absolute schema) {
66 return delegate().getClassForSchema(schema);
70 public Class<? extends BaseIdentity> getIdentityClass(final QName input) {
71 return delegate().getIdentityClass(input);
75 public <T> Class<T> loadClass(final JavaTypeName typeName) throws ClassNotFoundException {
76 return delegate().loadClass(typeName);
80 public Class<? extends RpcInput> getRpcInput(final QName rpcName) {
81 return delegate().getRpcInput(rpcName);
85 public Class<? extends RpcOutput> getRpcOutput(final QName rpcName) {
86 return delegate().getRpcOutput(rpcName);