Hi

I recently had a class having fields which could all of them be final.
Two kind of fields were present : interfaces injected through Guice
and use case related data (no binding possible as far as I can tell).

>From a purely Object Oriented perspective, I would like all these
fields values to be provided through the constructor and be done with
that.

But, using Guice in my application, I wonder how I should deal with
this situation.

Currently, my solution is to create new instances myself, providing
the use case related data, and then I get the injector to inject
members in my instance, thus providing the guice managed objects.

However, this solution doesn't feel nice. Isn't @Inject the new
"new" ? ;)

How should I/could I deal better with this requirements ?

side note : basically my need is for one time usage immutable objects
with (final) fields coming both from Guice and other origin.

thanks in advance
++
joseph
--~--~---------~--~----~------------~-------~--~----~
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 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-guice?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to