Guice extensions documentation - tutorial

65 views
Skip to first unread message

Uftapjech

unread,
Jun 27, 2014, 7:28:43 AM6/27/14
to google...@googlegroups.com
Anybody know a good description of how to extend Guice or even a tutorial.
I am looking for something between the official documentation and the code of the exiting extensions.
Something that explains the concepts of the extensions and where we can hook into.


Tim Boudreau

unread,
Jun 29, 2014, 5:21:35 AM6/29/14
to google...@googlegroups.com
Extend it to do what?

-Tim

Uftapjech

unread,
Jun 30, 2014, 9:24:25 AM6/30/14
to google...@googlegroups.com
What I am looking for is a way to add some kind of Just-In-Time binding.
I have code which is capable of implementing certain types of interfaces and any sub-interfaces using a dynamic proxy.  Currently I have to bind every instance to a provider that creates the proxy class. I would like to extend guice so that I can bind any subclass of a certain interface to an invocation handler and generically creates the implementations as they are needed. Without the explicit binding for every interface.

As I understood this is not possible with standard guice, I started looking at the extensions but the documentation is very very short.


Op zondag 29 juni 2014 11:21:35 UTC+2 schreef Tim Boudreau:

Tim Boudreau

unread,
Aug 19, 2014, 4:13:28 PM8/19/14
to google...@googlegroups.com
Guice needs to know about the types that are bound, that is true.  If you're looking to, say, *combine* interfaces - i.e. dynamically implement Foo & Bar - that's not going to work without a concrete type that combines Foo and Bar.

But just-in-time binding is a solution, not a problem.  What problem are you trying to solve?

-Tim

Reply all
Reply to author
Forward
0 new messages