Class Bootstrap

java.lang.Object
dev.zemco.codegame.Bootstrap

public final class Bootstrap extends Object
Bootstraps all needed application components. If new components / dependencies are added to the project, this is where they should be properly instantiated.

Originally we planned to use a dependency injection library Guice from Google, but we were unable to do so due to file size constrains of the final fat jar.

Author:
Erik Zemčík
  • Method Details

    • bootstrap

      public static IViewProvider bootstrap(Class<?> resourceClass, javafx.stage.Stage primaryStage)
      Bootstraps all needed application components with the provided resource class and primary stage. This method returns a provider of views, which can be used to retrieve the first view presented to the user.
      Parameters:
      resourceClass - class to use for resource resolving
      primaryStage - primary stage of the application
      Returns:
      view provider ready for use
      Throws:
      IllegalArgumentException - if resourceClass is null or if primaryStage is null