Details
-
Improvement
-
Status: In Review
-
Medium
-
Resolution: Unresolved
-
None
Description
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.
Attachments
Gerrit Reviews
| # | Subject | Branch | Project | Status | CR | V |
|---|---|---|---|---|---|---|
| 110141,2 | Improve RpcProviderService.registerRpcImplementations() | master | mdsal | Status: NEW | -1 | +1 |
| 110142,2 | Deprecate ClassToInstance-taking methods | master | mdsal | Status: NEW | 0 | +1 |