import java.lang.invoke.MethodHandles.Lookup;
import java.lang.invoke.MethodType;
import java.lang.reflect.Method;
-import java.util.Map;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.opendaylight.mdsal.binding.spec.reflect.BindingReflections;
return new NotificationListenerInvoker(createInvokerMap(key));
}
- private Map<QName, MethodHandle> createInvokerMap(final Class<? extends NotificationListener> key) {
+ private ImmutableMap<QName, MethodHandle> createInvokerMap(
+ final Class<? extends NotificationListener> key) {
final Builder<QName, MethodHandle> ret = ImmutableMap.builder();
for (final Method method : key.getMethods()) {
if (BindingReflections.isNotificationCallback(method)) {
}
});
- private final Map<QName, MethodHandle> methodInvokers;
+ private final ImmutableMap<QName, MethodHandle> methodInvokers;
- NotificationListenerInvoker(final Map<QName, MethodHandle> map) {
+ NotificationListenerInvoker(final ImmutableMap<QName, MethodHandle> map) {
this.methodInvokers = map;
}