An interface that represents the production of a type T. You can also inject Producer instead of T, which will delay the execution of any code that produces the T until #get is called. For example, you might inject Producer to lazily choose betw
| 92 | * @since 2.0 |
| 93 | */ |
| 94 | @Beta |
| 95 | public interface Producer<T> { |
| 96 | /** |
| 97 | * Returns a future representing a running task that produces a value. Calling this method will |
| 98 | * trigger the submission of this task to the executor, if it has not already been triggered. In |
| 99 | * order to trigger this task's submission, the transitive dependencies required to produce the |
| 100 | * {@code T} will be submitted to the executor, as their dependencies become available. |
| 101 | * |
| 102 | * <p>If the key is bound to a {@link Produces} method, then calling this method multiple times |
| 103 | * will return the same future. |
| 104 | */ |
| 105 | @CheckReturnValue |
| 106 | ListenableFuture<T> get(); |
| 107 | } |
no outgoing calls
no test coverage detected