Package dagger.hilt
Annotation Interface DefineComponent
Defines a Hilt component.
Example defining a root component, ParentComponent
:
@ParentScoped
@DefineComponent
interface ParentComponent {}
Example defining a child component, ChildComponent
:
@ChildScoped
@DefineComponent(parent = ParentComponent.class)
interface ChildComponent {}
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
Defines a builder for a Hilt component. -
Optional Element Summary
-
Element Details
-
parent
Class<?> parentReturns the parent of this component, if it exists.- Default:
- dagger.hilt.internal.definecomponent.DefineComponentNoParent.class
-