>
>     @Override
>>     public TemplateResolver get() {
>>         String templateResolverClass = .......; /* some logic */
>>         // FIXME : Wrong. Use the DI
>>         Class<? extends TemplateResolver> templateResolver = 
>> AppClassloader.classloader().loadClass(templateResolverClass).asSubclass(TemplateResolver.class);
>>         TemplateResolver instance = 
>> templateResolver.getDeclaredConstructor(TemplateRendererConfig.class).newInstance(templateRendererConfig);
>>         injector.injectMembers(instance);
>>         return instance;
>>     }
>> }
>>
>>
> I'll give this a try. Just what I need. I didn't know that I could inject 
> when the object was already created.
>

Work perfectly. Thanks !!


Igmar

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-guice/f2d2b4ad-3467-4012-ae70-e2849cbb5deb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to