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
I want:
- Node implementation can inject corresponding parent Domain to himself.
- Node implementation can inject Domain manager instance too.
class NodeImpl { @Inject NodeImpl(Domain parentDomain, DomainManager domainManager) {
} }
How can i do this?