mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 19:59:05 +01:00
Switched Roboguice/Guice out for Dagger 2
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user