Switched Roboguice/Guice out for Dagger 2

This commit is contained in:
Ernir Erlingsson
2016-03-03 10:24:40 +01:00
parent e5d7038195
commit 1be400eb84
89 changed files with 1640 additions and 802 deletions

View File

@@ -2,13 +2,17 @@ package org.briarproject.event;
import org.briarproject.api.event.EventBus;
import com.google.inject.AbstractModule;
import com.google.inject.Singleton;
import javax.inject.Singleton;
public class EventModule extends AbstractModule {
import dagger.Module;
import dagger.Provides;
@Override
protected void configure() {
bind(EventBus.class).to(EventBusImpl.class).in(Singleton.class);
@Module
public class EventModule {
@Provides
@Singleton
EventBus provideEventBus() {
return new EventBusImpl();
}
}