Aha.

With the latest HEAD code, you should be able to use ProvisionListener to
intercept the creation of the assisted objects.  You may be able to use
TypeListener also.

 sam


On Wed, Jan 30, 2013 at 2:26 AM, Stefan Liebig <[email protected]>wrote:

> 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]> 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].
>>> To unsubscribe from this group, send email to google-guice...@**
>>> googlegroups.com.
>>>
>>> Visit this group at 
>>> http://groups.google.com/**group/google-guice?hl=en<http://groups.google.com/group/google-guice?hl=en>
>>> .
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<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.
>
>
>

-- 
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.


Reply via email to