Because I want to intercept the newly created objects to perform various tasks that I do not want to implement into the factory.
Stefan On Saturday, January 26, 2013 12:51:06 AM UTC+1, Sam Berlin wrote: > > First question: why? > > sam > On Jan 25, 2013 11:29 AM, "Stefan Liebig" <[email protected]<javascript:>> > wrote: > >> I would like to intercept the "generated" methods of a factory created >> with the FactoryModuleBuilder. >> I tried several variations of this: >> >> install( new FactoryModuleBuilder().implement( INode.class, >> RealNode.class ).build( IRealNodeFactory.class ) ); >> final RealNodeCreationHook realNodeCreationHook = new >> RealNodeCreationHook(); >> requestInjection( realNodeCreationHook ); >> bindInterceptor( subclassesOf( IRealNodeFactory.class ), >> Matchers.any(), realNodeCreationHook ); >> >> But I had no success. Any idea besides writing the factory manually? >> >> Stefan >> >> -- >> You received this message because you are subscribed to the Google Groups >> "google-guice" group. >> To post to this group, send email to [email protected]<javascript:> >> . >> To unsubscribe from this group, send email to >> [email protected] <javascript:>. >> Visit this group at http://groups.google.com/group/google-guice?hl=en. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
