ABCDEFGHIJKLMNOPQRST
1
JesseChristianYuriEasy workaround?
2
https://groups.google.com/d/msg/dagger-discuss/QgnvmZ-dH9c/qxkCF7KISjMJhttps://docs.google.com/document/d/1BioRZqm-pmhAPkFcKu_DD7Xslzw5bTx4ls00x0xCjSQ/edithttps://docs.google.com/document/d/1lPbDBK-5RDA1a8iR2pEeqwGEoyPAK0NXFVmQrD0Y0DQ/edit
3
SummaryGenerate module passed to ObjectGraph.plus()Generate factory as you'd DIYUse special methods in the module
4
Supports reflectionYesPossibly (assuming disambiguation)Yes
5
Supports code-generation?Yes?
6
binding the factory to a sub-type of the declared return type (the Payment→RealPayment from Guice's wiki: https://code.google.com/p/google-guice/wiki/AssistedInject)NoNo (but possible)Yesdeclare a sub-interface with covariant return type, and a `@Provides` method to bind the sub-interface to its super-interface
7
a factory interface from a 3rd-party library (e.g. java.util.concurrent.ThreadFactory)NoNo (but possible)Yessub-interface (easy fix: add a `factories` attribute to `@Module`)
8
a class that is injectable but, for some use case, we want to provide some dependencies through factory arguments (the class could possibly be injected directly elsewhere in the app)YesNo (but probably doable)Yes (possible)
9
several methods in the factory with the same return type, dispatching to the appropriate constructor/members of the created class (the “Multiple factory methods for the same type” case from GUice's javadoc: http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/assistedinject/FactoryModuleBuilder.html )No (probably impossible)Yes (possible)No (but probably doable in case when one module for one factory)
10
factory for different return typesYesYes (possible)Yes (possible)Implement the factory manually delegating to injected type-specific factories
11
several methods in the factory with the same return type, being able to map them to different sub-types (the “More configuration options”, with fast-car → Porsche & clean-car → Prius, from Guice's javadoc: http://google-guice.googlecode.com/svn/trunk/javadoc/com/google/inject/assistedinject/FactoryModuleBuilder.html )No (but probably doable)No (but probably doable)No (but probably doable)sub-interface with covariant return type (if "factory for different return types" is supported; otherwise, same "easy workaround" as that other use-case)
12
should the assisted parameters be injectable to fields (and methods when/if we support them) or only as constructor arguments?
The question here is: would it make the code easier to limit to constructor arguments?
NoYesYes
13
14
Generated code is independent of `Binding`s or other Dagger implementation details?NoYesNo
15
16
how do we want to disambiguate arguments of the same type?QualifierSeveral proposals - currently param orderQualifier
17
How are modules used?No unusual module involvement (except possibly for 3rd party factories)?
18
Implementation in place?Yes (With order-based disambiguation and no reflection yet)Yes (Without code-gen)
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100