Remove RpcServiceInvoker.from(Class)
[mdsal.git] / binding / mdsal-binding-dom-adapter / src / main / java / org / opendaylight / mdsal / binding / dom / adapter / invoke / RpcServiceInvoker.java
index 5cbb08c0f0016e31a165f638212e2200b7141391..002dc95b1ca76ed17abf3d6c24100256a1e9a63e 100644 (file)
@@ -7,12 +7,13 @@
  */
 package org.opendaylight.mdsal.binding.dom.adapter.invoke;
 
-import com.google.common.base.Preconditions;
+import static com.google.common.base.Preconditions.checkArgument;
+
 import com.google.common.util.concurrent.ListenableFuture;
 import java.lang.reflect.Method;
 import java.util.Map;
-import javax.annotation.Nonnull;
-import javax.annotation.Nullable;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 import org.opendaylight.yangtools.yang.binding.RpcService;
 import org.opendaylight.yangtools.yang.common.QName;
@@ -31,16 +32,6 @@ import org.slf4j.LoggerFactory;
 public abstract class RpcServiceInvoker {
     private static final Logger LOG = LoggerFactory.getLogger(RpcServiceInvoker.class);
 
-    /**
-     * Creates RPCServiceInvoker for specified RpcService type.
-     *
-     * @param type RpcService interface, which was generated from model.
-     * @return Cached instance of {@link RpcServiceInvoker} for supplied RPC type.
-     */
-    public static RpcServiceInvoker from(final Class<? extends RpcService> type) {
-        return ClassBasedRpcServiceInvoker.instanceFor(type);
-    }
-
     /**
      * Creates an RPCServiceInvoker for specified QName-&lt;Method mapping.
      *
@@ -48,7 +39,7 @@ public abstract class RpcServiceInvoker {
      * @return An {@link RpcServiceInvoker} instance.
      */
     public static RpcServiceInvoker from(final Map<QName, Method> qnameToMethod) {
-        Preconditions.checkArgument(!qnameToMethod.isEmpty());
+        checkArgument(!qnameToMethod.isEmpty());
         QNameModule module = null;
 
         for (QName qname : qnameToMethod.keySet()) {
@@ -75,6 +66,6 @@ public abstract class RpcServiceInvoker {
      * @param input Input data for RPC.
      * @return Future which will complete once rpc procesing is finished.
      */
-    public abstract ListenableFuture<RpcResult<?>> invokeRpc(@Nonnull RpcService impl, @Nonnull QName rpcName,
+    public abstract ListenableFuture<RpcResult<?>> invokeRpc(@NonNull RpcService impl, @NonNull QName rpcName,
             @Nullable DataObject input);
 }