I'm using a game server that instantiates objects (Event handlers, etc)
that I would like to inject references into. Since they construct these
instances, is there an approach other than doing something in a default
constructor like this to inject those dependencies?
public class MyHandler {
MyInectedClass myInjectedObj;
public MyHandler() {
myInjectedObj =
MyInjector.getInstance().getInjector(MyInjectedClass.class);
}
...
}
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-guice/-/jHP4Df5PrHYJ.
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.