I though that by specifying an eager init directive to TimeZoneControl would mean that when I getInstance(“Account”) that the TimeZone variable inject into it would be initialized and it’s not. The reason I want to do this is because there will be conditions where when an Account object is populated it will NOT have a TimeZone so that injected object instance will not be populated…but I want to be able to ask the TimeZone object inside account if it is valid…which I cannot do unless the object is initialized. I COULD initialize it in the Account object but that defeats the whole point of injecting it in the first place.
It makes no sense to eagerly init a transient Mike. Because the eagerly inited instance is created and destroyed. So eager init only makes sense for non-transient objects.
Ok…so that helps with what NOT to do…but the problem that remains is how to initialize an injected property that is a mapped class (or not mapped for that matter) without having to code something in the containing class I’m injecting into.
WireBox always calles the object’s init() method upon instantiation. So every dependency should be correctly inited unless the object does NOT have an init() method, or you remove the init constructor via the “constructor()” binder object. So don’t understand if that is what you mean.