org.opendaylight.mdsal.binding.dom.adapter.ActionServiceAdapter Maven / Gradle / Ivy
/*
* Copyright (c) 2018 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.mdsal.binding.dom.adapter;
import static com.google.common.base.Preconditions.checkArgument;
import com.google.common.collect.ClassToInstanceMap;
import com.google.common.collect.ImmutableSet;
import java.lang.reflect.Proxy;
import java.util.Set;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.opendaylight.mdsal.binding.api.ActionService;
import org.opendaylight.mdsal.binding.api.ActionSpec;
import org.opendaylight.mdsal.binding.api.DataTreeIdentifier;
import org.opendaylight.mdsal.binding.dom.adapter.BindingDOMAdapterBuilder.Factory;
import org.opendaylight.mdsal.dom.api.DOMActionService;
import org.opendaylight.mdsal.dom.api.DOMService;
import org.opendaylight.yangtools.binding.Action;
import org.opendaylight.yangtools.binding.DataObject;
import org.opendaylight.yangtools.binding.DataObjectIdentifier;
import org.opendaylight.yangtools.binding.reflect.BindingReflections;
@NonNullByDefault
final class ActionServiceAdapter
extends AbstractBindingLoadingAdapter, ActionAdapter>
implements ActionService {
private static final class Builder extends BindingDOMAdapterBuilder {
Builder(final AdapterContext adapterContext) {
super(adapterContext);
}
@Override
public Set>> getRequiredDelegates() {
return ImmutableSet.of(DOMActionService.class);
}
@Override
protected ActionService createInstance(final ClassToInstanceMap> delegates) {
return new ActionServiceAdapter(adapterContext(), delegates.getInstance(DOMActionService.class));
}
}
static final Factory BUILDER_FACTORY = Builder::new;
ActionServiceAdapter(final AdapterContext adapterContext, final DOMActionService delegate) {
super(adapterContext, delegate);
}
@Override
public