-
Improvement
-
Resolution: Fixed
-
Neutral
-
None
-
None
-
None
The main advantage of Key vs Class when it comes to Guice configuration is that the former allows to add context information to the type with binding annotations (Key.get(class, annotation)).
This is the crucial mechanism which enables the effort of UI IoC optimisation, where we allow to map types to different impls depending on the UI context.
Unfortunately, our API which connects our module descriptors (XML) with the Guice binding DSLs (Java) only exposes the ability to map the types over Class literals.
I suggest to change the underlying behaviour to rely on the Keys instead of Classes (this is 99% binary compatible since almost no public API is touched). Another proposal is to allow to configure the component annotations through our configuration classes.
- is depended upon by
-
MGNLUI-4180 Conduct UI-related IoC binding without Guice machinery ending up in the http session
- Closed