File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
core/src/main/java/dagger
producers/src/main/java/dagger/producers Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 171171 * inherit the <em>entire</em> binding graph from its parent when it is declared. For that reason,
172172 * a subcomponent isn't evaluated for completeness until it is associated with a parent.
173173 *
174- * <p>Subcomponents are declared via a factory method on a parent component or subcomponent. The
175- * method may have any name, but must return the subcomponent. The factory method's parameters may
176- * be any number of the subcomponent's modules, but must at least include those without visible
174+ * <p>Subcomponents are declared by listing the class in the {@link Module#subcomponents()}
175+ * attribute of one of the parent component's modules. This binds the {@link Subcomponent.Builder}
176+ * within the parent component.
177+ *
178+ * <p>Subcomponents may also be declared via a factory method on a parent component or subcomponent.
179+ * The method may have any name, but must return the subcomponent. The factory method's parameters
180+ * may be any number of the subcomponent's modules, but must at least include those without visible
177181 * no-arg constructors. The following is an example of a factory method that creates a
178182 * request-scoped subcomponent from a singleton-scoped parent: <pre><code>
179183 * {@literal @}Singleton {@literal @}Component
Original file line number Diff line number Diff line change 4040 * Any {@link Subcomponent}- or {@code @ProductionSubcomponent}-annotated classes which should be
4141 * children of the component in which this module is installed. A subcomponent may be listed in
4242 * more than one module in a component.
43+ *
44+ * @since 2.7
4345 */
4446 @ Beta
4547 Class <?>[] subcomponents () default {};
Original file line number Diff line number Diff line change 4646 * Any {@link dagger.Subcomponent}- or {@link ProductionSubcomponent}-annotated classes which
4747 * should be children of the component in which this module is installed. A subcomponent may be
4848 * listed in more than one module in a component.
49+ *
50+ * @since 2.7
4951 */
5052 Class <?>[] subcomponents () default {};
5153}
You can’t perform that action at this time.
0 commit comments