Package dev.zemco.codegame
Class Bootstrap
java.lang.Object
dev.zemco.codegame.Bootstrap
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 Summary
Modifier and TypeMethodDescriptionstatic IViewProviderBootstraps all needed application components with the provided resource class and primary stage.
-
Method Details
-
bootstrap
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 resolvingprimaryStage- primary stage of the application- Returns:
- view provider ready for use
- Throws:
IllegalArgumentException- ifresourceClassisnullor ifprimaryStageisnull
-