How can i pass "this" parameter of domain to node object that should be created by guice?
On Apr 30, 12:49 am, Chad Urso McDaniel <[email protected]> wrote: > On Thu, Apr 28, 2011 at 11:57 PM, [email protected] > > <[email protected]> wrote: > > Hi! Sry for my english. I have next problem.. I have three entities > > DomainManager, Domain and Node. DomainManager is singleton that able > > to create list of Domain objects. Each Domain can create list of Node > > objects: > > > DomainManager 1<>-----* Domain 1<>----* Node > > If a DomainManager is creating Domain objects it would be simplest to > have the DomainManager pass "this" directly during creation. Same with > Domain creating Node objects. > > > > > > > > > > > > > I want: > > > 1. Node implementation can inject corresponding parent Domain to > > himself. > > 2. Node implementation can inject Domain manager instance too. > > > class NodeImpl { > > @Inject > > NodeImpl(Domain parentDomain, DomainManager domainManager) { > > > } > > } > > > How can i do this? > > > -- > > 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 > > athttp://groups.google.com/group/google-guice?hl=en. > > -- > want to chat with me?http://tinyurl.com/5u3ohp -- 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.
