tag:blogger.com,1999:blog-9018398.post5765135642573942661..comments2017-12-26T00:23:16.260+07:00Comments on Fancy one more Java cup?: How to intercept Guice instance creation?Jean-Francois Poilprethttp://www.blogger.com/profile/00898429429517716882noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-9018398.post-26002890644128118972008-07-28T00:22:00.000+07:002008-07-28T00:22:00.000+07:00Thank you for your comment Jesse.My use case is mo...Thank you for your comment Jesse.<BR/>My use case is more or less explained in my post. Here are some more details:<BR/><BR/>I am currently working on "Guice-GUI" a GUI framework that, among other things, integrates Guice with Swing Application Framework.<BR/><BR/>In this framework, I define the main class that creates the Injector (and uses it later on to instantiate dialogs or other panels).<BR/><BR/>In the GUI, it is quite common to use the EventBus library; it has support for annotations. Often, some panels will use these annotations to subscribe to some EventBus topics.<BR/><BR/>My idea is then to give a chance to developers who use my framework to add one hook that will process EventBus annotations. This is just what I have done in one sample GUI I'll deliver with this framework.<BR/><BR/>For the Commands API, I prefer to wait until Guice 2.0 is released (or any beta is OK, as long as I don't have to build it myself, I've no time for it)Jean-Francois Poilprethttps://www.blogger.com/profile/00898429429517716882noreply@blogger.comtag:blogger.com,1999:blog-9018398.post-63883643929520003062008-07-27T23:18:00.000+07:002008-07-27T23:18:00.000+07:00Very clever! Bob's got ambitious plans for constru...Very clever! Bob's got ambitious plans for construction interception but I think we'll have to leave that until after 2.0 to meet our self-imposed deadline.<BR/><BR/>Curious - could you expand on some of your use cases for this?<BR/><BR/>Also - you should look at the Commands API, which you could use to rewrite modules to include these hooked scopes.swankjessehttps://www.blogger.com/profile/04905794974441087900noreply@blogger.com