gh-pages / com.nextfaze.devfun.reference / Dagger2Component
Dagger2Component
@Target([AnnotationTarget.PROPERTY, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.FUNCTION]) annotation class Dagger2Component (source)
Annotated functions (fun, properties, or property getters (@get:Dagger2Component)) will be checked/used as Dagger 2 components.
If all scope and priority are unset/default then a best-guess will be made based on where the reference is.
i.e.
- If its in an
Applicationclass then it’ll be assumed to be application level etc. - If it’s an extension function then the receiver will be used.
See Also
Constructors
| Name | Summary |
|---|---|
| <init> | Dagger2Component(scope: Dagger2Scope = UNDEFINED, priority: Int = 0, isActivityRequired: Boolean = false, isFragmentActivityRequired: Boolean = false)Annotated functions ( fun, properties, or property getters (@get:Dagger2Component)) will be checked/used as Dagger 2 components. |
Properties
| Name | Summary |
|---|---|
| isActivityRequired | val isActivityRequired: BooleanHere if for whatever reason you can’t/don’t want to use scope - will only be used if scope is UNDEFINED and priority is non-zero. |
| isFragmentActivityRequired | val isFragmentActivityRequired: BooleanHere if for whatever reason you can’t/don’t want to use scope - will only be used if scope is UNDEFINED and priority is non-zero. |
| priority | val priority: IntHere if for whatever reason you can’t/don’t want to use scope - will only be used if scope is UNDEFINED. |
| scope | val scope: Dagger2ScopeThe scope of this component. |