Package dagger.hilt
Annotation Type EntryPoint
-
@Retention(CLASS) @Target(TYPE) public @interface EntryPoint
Annotation for marking an interface as an entry point into a generated component. This annotation must be used withInstallIn
to indicate which component(s) should have this entry point. When assembling components, Hilt will make the indicated components extend the interface marked with this annotation.To use the annotated interface to access Dagger objects, use
EntryPoints
.Example usage:
@EntryPoint @InstallIn(SingletonComponent.class) public interface FooEntryPoint { Foo getFoo(); } Foo foo = EntryPoints.get(component, FooEntryPoint.class).getFoo();
- See Also:
- Entry points