Package dagger.hilt
Annotation Interface InstallIn
An annotation that declares which component(s) the annotated class should be included in when
Hilt generates the components. This may only be used with classes annotated with
@
Module
or @EntryPoint
.
Example usage for installing a module in the generated ApplicationComponent
:
@Module
@InstallIn(SingletonComponent.class)
public final class FooModule {
@Provides
static Foo provideFoo() {
return new Foo();
}
}
- See Also:
-
Required Element Summary
-
Element Details
-
value
Class<?>[] value
-