public final class DaggerAdapter extends Object
@dagger.Module
such that their
@dagger.Provides
methods can be properly invoked by Guice to perform their
provision operations.
Simple example:
Guice.createInjector(...other modules..., DaggerAdapter.from(new SomeDaggerAdapter()));
Some notes on usage and compatibility.
@Singleton
for all scopes, including shorter-lived scopes
like per-request or per-activity. Using modules written with Dagger 1.x usage
in mind may result in mis-scoped objects.
Modifier and Type | Method and Description |
---|---|
static Module |
from(Object... daggerModuleObjects)
Returns a guice module from a dagger module.
|