Created
September 4, 2012 11:48
-
-
Save andytill/3620534 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.google.inject.AbstractModule; | |
import com.google.inject.Provides; | |
public class FXMLLoadingModule extends AbstractModule { | |
private final FXMLLoadingScope fxmlLoadingScope; | |
public FXMLLoadingModule() { | |
fxmlLoadingScope = new FXMLLoadingScope(); | |
} | |
@Override | |
protected void configure() { | |
bindScope(FXMLLoadingScoped.class, fxmlLoadingScope); | |
} | |
@Provides | |
public ControllerLookup provideControllerLookup() { | |
return new ControllerLookup(fxmlLoadingScope.getControllers()); | |
} | |
@Provides | |
public FXMLLoadingScope provideFxmlLoadingScope() { | |
return fxmlLoadingScope; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment