public final class DaggerAdapter
extends java.lang.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(java.lang.Object... daggerModuleObjects)
Returns a guice module from a dagger module.
|
public static Module from(java.lang.Object... daggerModuleObjects)
Note: At present, it does not honor @Module(includes=...)
directives.