Details
-
Improvement
-
Resolution: Won't Do
-
Major
-
None
-
None
-
None
Description
If ComponentProvider.getSingleton(com.foo.SomeSubInterface.class) is called, and no component is registered specifically for com.foo.SomeSubInterface, the ComponentProvider should look up registration for parents of com.foo.SomeSubInterface (i.e com.foo.SomeInterface, if SomeSubInterface extends SomeInterface)
This should:
- remove the need for casting when depending on a specific implementation:
// instead of: SomeSubInterface z = (SomeSubInterface) Components.getSingleton(SomeInterface.class); // you should be able to do: SomeSubInterface z = Components.getSingleton(SomeSubInterface.class); // even if only SomeInterface was configured (i.e if there's only a property for com.foo.SomeInterface)
- likewise, this should fix
MAGNOLIA-3059– TODO: insert details as to how/why
Checklists
Acceptance criteria
Attachments
Issue Links
- is related to
-
MAGNOLIA-3059 Unable to replace implementation of the dynamically loaded class with its super class
-
- Closed
-
-
MAGNOLIA-2569 Components: introduce dependency injection
-
- Closed
-
-
MAGNOLIA-2553 FactoryUtil: should return a proxy object for observed objects
-
- Closed
-