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 171
171
* inherit the <em>entire</em> binding graph from its parent when it is declared. For that reason,
172
172
* a subcomponent isn't evaluated for completeness until it is associated with a parent.
173
173
*
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
177
181
* no-arg constructors. The following is an example of a factory method that creates a
178
182
* request-scoped subcomponent from a singleton-scoped parent: <pre><code>
179
183
* {@literal @}Singleton {@literal @}Component
Original file line number Diff line number Diff line change 40
40
* Any {@link Subcomponent}- or {@code @ProductionSubcomponent}-annotated classes which should be
41
41
* children of the component in which this module is installed. A subcomponent may be listed in
42
42
* more than one module in a component.
43
+ *
44
+ * @since 2.7
43
45
*/
44
46
@ Beta
45
47
Class <?>[] subcomponents () default {};
Original file line number Diff line number Diff line change 46
46
* Any {@link dagger.Subcomponent}- or {@link ProductionSubcomponent}-annotated classes which
47
47
* should be children of the component in which this module is installed. A subcomponent may be
48
48
* listed in more than one module in a component.
49
+ *
50
+ * @since 2.7
49
51
*/
50
52
Class <?>[] subcomponents () default {};
51
53
}
You can’t perform that action at this time.
0 commit comments