Howdy all,

I'm just wondering if someone has a nice solution on how to initialize
leaf nodes in the dependency graph. Currently I have a few Presenter
classes that pretty much just listens on model and view events. The
provider for them look something like this:

@Provides
@Singleton
public LoginPresenter getLoginPresenter(SomveView,
ListenerDispatcher<ServerConnectionListener> serverLD,
ListenerDispatcher<LoginListener> loginLD) {
        LoginPresenter loginPresenter = new LoginPresenter(someView,
someModel);
        serverLD.addListener(loginPresenter);
        loginLD.addListener(loginPresenter);
        return loginPresenter;
}

To initialize this class I have to force the creation of it in the main
() method, injector.getInstance(...);

What kind of solutions have you people come up with in situations like
this? Thanks!

--

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