[INFRAUTILS-63] Guice Inject utility ideas Created: 30/Jan/19  Updated: 04/Feb/19  Resolved: 04/Feb/19

Status: Resolved
Project: infrautils
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Medium
Reporter: Michael Vorburger Assignee: Michael Vorburger
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to CONTROLLER-1831 Utilities to bootstrap CDS in a stand... Resolved

 Description   

infrautils.inject

  1. Scan for @Service on @Singleton to find interface to bind to
  2. interface WiringProvider extends Provider<Map<Type, Object>>
  3. WiringReflectiveWiringProvider which looks for getters on *Wiring
class ModuleBuilder { 
    Module build(); // ignore duplicates, auto inject ClasspathScanner 
    addModule(Class<Module> moduleClass); 
    addPackage(String packageName);


 Comments   
Comment by Michael Vorburger [ 04/Feb/19 ]

It occurred to me, with a few days distance, that any such "magic" like what I imagined above, would make error tracking for Guice DI much more difficult than with today's still (once you are used to them) clear errors... Guice points out which Module what binding is from - but it could not do that anymore if we did above, so I think this is actually NOT a good idea - so closing this.

Generated at Wed Feb 07 20:02:10 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.