code: @Override
      public final void init() throws Exception {
  
          super.init();
  
          @SuppressWarnings("unchecked")
          final Class<GuiceApplication> clazz = (Class<GuiceApplication>) getClass();
          final GuiceApplication instance = this;
  
          // Checks the GuiceApplication instance and makes sure that none of the constructors is
          // annotated with @Inject!
          for (final Constructor<?> c: instance.getClass().getConstructors()) {
              if (isInjectAnnotationPresent(c)) {
                  throw new IllegalStateException("GuiceApplication with constructor that is marked with @Inject is not allowed!");
              }
          }
  
          final Set<Module> modules = new HashSet<>();
          modules.add(new AbstractModule() {
              @Override
              protected void configure() {
  				bind(clazz).toProvider(new Provider<GuiceApplication>() {
  					@Override public GuiceApplication get() {
  						return instance;
  					}
  				});
              }
          });
          modules.add(new FXMLLoadingModule());
          modules.add(new FxApplicationThreadModule());
          modules.add(new PersistentPropertyModule());
  
          // Propagates initialization of additional modules to the specific
          // subclass of this GuiceApplication instance.
          final List<Module> additionalModules = new ArrayList<>();
          init(additionalModules);
          modules.addAll(additionalModules);
  
          // Creates an injector with all of the required modules.
          injector = createInjector(modules);
  
          // Injects all fields annotated with @Inject into this GuiceApplication instance.
          injector.injectMembers(instance);
  
      }
docs: To make sure that the initialization of Guice-based JavaFX application
  works flawlessly, the original init method of the base JavaFX Application
  class is overwritten here.
  <p>This class offers it's own method for custom initialization, which will be called
  during the invocation of this overriden method: {@link #init(java.util.List)}.</p>