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; } }