Hi

I tried once to accomplish a similar thing for testing and did not find a solution.
If your code base does not change during runtime (i.e: there are no plugins which can be dynamically loaded and unloaded) you could use inspection to analyze the code base and create bindings for all classes that fulfill some criteria (i.e. are subclass of CustomSingleton).
A nice start point for such a code base scan could be the util class from the stripes project:
http://sourceforge.net/p/stripes/code/HEAD/tree/trunk/stripes/src/net/sourceforge/stripes/util/ResolverUtil.java




On 05/13/2014 05:16 AM, Linead wrote:
Hi, 

I'm trying to integrate into an old system while providing full BC, this will replace old code with injector.getInstance(Class) calls.

I would like to provide customized JIT bindings to allow for scope selection based on subclass ( e.g if(class instanceof CustomSingleton) { set scope to singlet } )
I've searched the the guice code for a way to do this but there's nothing that seems to allow for me to override the creation of a JIT binding.

Can anyone advise if there's a way this can be done?

Thanks
--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "google-guice" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-guice.
For more options, visit https://groups.google.com/d/optout.

Reply via email to