Passing the "binding annotaion" as a parameter (Dynamic binding)

42 views
Skip to first unread message

royi klein

unread,
Sep 8, 2022, 11:01:22 AM9/8/22
to google-guice
Hi

I have the following scenarion:

I have a system architectured as "plugins" that are loaded per annotation - an inrerface has multiple implementations that are injected according to an annotations.
Until now - we are OK.

Problem is - those implementations have injections to their private members (usually as inject members and not contructor injection):
I need to be able to inject using the same annotation that was used before but I don't  know in advance what is the "context" here.
Is there a way to get the binding annotation used / pass it as an argument somehow?

Thanks 
Reply all
Reply to author
Forward
0 new messages