class InjectionLoaderImpl implements InjectionLoader {
    
    private static final String FXML_PREFIX = "/fxml/";
    private static final String FXML_SUFFIX = ".fxml";
    
    private final Map<Class<?>, Supplier<? extends Initializable>> constructors;
    private final InfoComponent infoComponent;
    private final Brand brand;

    private UserInterfaceComponent userInterfaceComponent;
    private Injector injector;

    public InjectionLoaderImpl(
        final InfoComponent infoComponent,
        final Brand brand
    ) {
        this.infoComponent = requireNonNull(infoComponent);
        this.brand = requireNonNull(brand);
        constructors = new ConcurrentHashMap<>();
    }

    @ExecuteBefore(value = INITIALIZED, missingArgument = MissingArgumentStrategy.SKIP_INVOCATION)
    public void setUserInterfaceComponent(UserInterfaceComponent userInterfaceComponent) {
        this.userInterfaceComponent = requireNonNull(userInterfaceComponent);
    }

    @ExecuteBefore(INITIALIZED)
    public void setInjector(Injector injector) {
        this.injector = requireNonNull(injector);
    }

    @ExecuteBefore(INITIALIZED)
    public void installConstructors() {
        constructors.put(AboutController.class,            AboutController::new);
        constructors.put(ComponentsController.class,       ComponentsController::new);
        constructors.put(ConnectController.class,          ConnectController::new);
        constructors.put(MailPromptController.class,       MailPromptController::new);
        constructors.put(MenubarController.class,          MenubarController::new);
        constructors.put(NotificationAreaController.class, NotificationAreaController::new);
        constructors.put(OutputController.class,           OutputController::new);
        constructors.put(ProjectTreeController.class,      ProjectTreeController::new);
        constructors.put(SceneController.class,            SceneController::new);
        constructors.put(ToolbarController.class,          ToolbarController::new);
        constructors.put(WorkspaceController.class,        WorkspaceController::new);
        constructors.put(ProjectProblemController.class,   ProjectProblemController::new);
    }
    
    public FXMLLoader fxmlLoader() {
        final FXMLLoader loader = new FXMLLoader(StandardCharsets.UTF_8);
        
        loader.setControllerFactory(clazz -> MapStream.of(constructors)
            .filterKey(clazz::isAssignableFrom)
            .values()
            .findFirst()
            .map(Supplier::get)
            .map(injector::inject)
            .orElseThrow(() -> new SpeedmentToolException(
                "FXML Controller '" + clazz.getName() +
                "' have not been installed in " +
                getClass().getSimpleName() + "."
            )));
        
        return loader;
    }

    @Override
    public <T extends Initializable> void install(Class<T> controllerClass, Supplier<T> newController) {
        constructors.put(controllerClass, newController);
    }

    @Override
    public Node load(String name) {
        final FXMLLoader loader = fxmlLoader();
        final String filename = FXML_PREFIX + name + FXML_SUFFIX;
        loader.setLocation(InjectionLoaderImpl.class.getResource(filename));
        
        try {
            return loader.load();
        } catch (final IOException ex) {
            throw new SpeedmentToolException(
                "Error! Could not find FXML-file: " + filename + ".", ex
            );
        }
    }

    @Override
    public Parent loadAndShow(String name) {
        final Parent parent = (Parent) load(name);
        final Stage stage = requireNonNull(userInterfaceComponent.getStage());
        final Scene scene = new Scene(parent);
        
        stage.hide();
        BrandUtil.applyBrand(injector, stage, scene);
        stage.setScene(scene);
        WindowSettingUtil.applySaveOnCloseMethod(stage, name);
        if ("Scene".equals(name)) {
            WindowSettingUtil.applyStoredDisplaySettings(stage, name);
        }
        stage.show();
        
        return parent;
    }

    @Override
    public Parent loadAsModal(String name) {<FILL_FUNCTION_BODY>}
}

        final Stage mainStage = requireNonNull(userInterfaceComponent.getStage());
        final Stage dialog    = new Stage();
        final Parent root     = (Parent) load(name);
        final Scene scene     = new Scene(root);
        
        BrandUtil.applyBrandToScene(injector, scene);
        
        dialog.setTitle("About " + infoComponent.getTitle());
        dialog.initModality(APPLICATION_MODAL);
        brand.logoSmall().map(Image::new).ifPresent(dialog.getIcons()::add);
        dialog.initOwner(mainStage);
        dialog.setScene(scene);
        dialog.show();
        
        return root;
    
<no_super_class>