-
Improvement
-
Resolution: Done
-
Medium
-
None
We requires a ClassToInstanceMap here, mirror the API from mdsal-dom-api.
While this is required in mdsal-dom-api, as we cannot determine the RPC type, with binding we can do better:
default @NonNull Registration registerRpcImplementations(final Collection<Rpc<?, ?>> implementations) { final var map = MutableClassToInstanceMap.<Rpc<?, ?>> create(); for (var impl : implementations) { map.put(impl.implementedInterface(), impl); } return registerRpcImplementations(map); }
i.e. determine the implemented interface and index passed in implementations. This allows downstreams to use varargs.