@Documented @Target(value=TYPE) @Beta public @interface ProductionComponent
@ProductionComponent prepended with
Dagger. For example, @ProductionComponent interface MyComponent {...} will
produce an implementation named DaggerMyComponent.
Each Produces method that contributes to the component will be called at most once per
component instance, no matter how many times that binding is used as a dependency.
TODO(user): Decide on how scope works for producers.
Every type annotated with @ProductionComponent must contain at least one abstract
component method. Component methods must represent production.
Production methods have no arguments and return either a ListenableFuture or
Producer of a type that is injected, provided, or
produced. Each may have a Qualifier annotation as well. The following
are all valid production method declarations:
{@code
ListenableFuture getSomeType();
Producer> getSomeTypes(); | Modifier and Type | Optional Element and Description |
|---|---|
Class<?>[] |
dependencies
A list of types that are to be used as component dependencies.
|
Class<?>[] |
modules
A list of classes annotated with
Module or ProducerModule whose bindings are
used to generate the component implementation. |
public abstract Class<?>[] modules
Module or ProducerModule whose bindings are
used to generate the component implementation.public abstract Class<?>[] dependencies
Copyright © 2015 Google, Inc.. All rights reserved.