+ bind(Version.class).toInstance(VERSION);
+ bind(PluginVersion.class).toInstance(new PluginVersion(getVersion()));
+ bind(PluginYear.class).toInstance(new PluginYear(getYear()));
+ bind(PluginHomepage.class).toInstance(new PluginHomepage(getHomepage()));
+ if (startConfiguration.getBooleanValue("Developer.LoadFromFilesystem").getValue(false)) {
+ String path = startConfiguration.getStringValue("Developer.FilesystemPath").getValue(null);
+ if (path != null) {
+ bind(Loaders.class).toInstance(new DebugLoaders(path));
+ }
+ }
+ bindListener(Matchers.any(), new TypeListener() {
+
+ @Override
+ public <I> void hear(TypeLiteral<I> typeLiteral, TypeEncounter<I> typeEncounter) {
+ typeEncounter.register(new InjectionListener<I>() {
+
+ @Override
+ public void afterInjection(I injectee) {
+ eventBus.register(injectee);
+ }
+ });
+ }
+ });
+ }
+
+ private TypeLiteral<Optional<Context>> getOptionalContextTypeLiteral() {
+ return new TypeLiteral<Optional<Context>>() {
+ };