-
Notifications
You must be signed in to change notification settings - Fork 3.1k
abstract provides methods #176
Comments
ahh.. maybe we can rename to Anyway, that's a good idea, trying On Sat, Mar 2, 2013 at 9:00 AM, Jesse Wilson notifications@github.comwrote:
|
The one thought I did have that's worth making is that I generally think On 2 Mar 2013, at 8:27, Adrian Cole wrote:
|
Just a heads-up @adriancole, as you may have seen with #196 fixing #188 we now explicitly are disallowing inheritance in modules. |
Thanks for the heads up! |
Removing wont fix it since you are already subscribed to this issue. You can change your subscription preference by using the drop down at the bottom of the page. As you alluded, you were auto-subscribed when he didn't fence your name with backticks. It's hard to remember to do this 100% of the time. |
@JakeWharton thanks |
Closing this. It isn't really an issue but more of a discussion around best practices. The mailing list is a great place for this and probably will reach more users. |
This is probably more a usage question than an issue.
I've got something goofy in denominator wrt dagger. Basically a Provider (like route53) is a dagger module. I want to make it easy to implement and inject provider metadata without having to know too many details. For example, our DNSApiManager uses Provider (a dagger module) directly.
Provider defines some things like its name and the type of credentials it can accept as abstract methods. I'd prefer this to be an interface actually.
Anyway, these are needed pre-dagger, as that metadata is used to determine what other dagger modules are needed (chicken-egg problem).
ex. the module list for the graph includes the provider module, and conditionally other modules.
if (provider.defaultCredentialSupplier().isPresent()) { modulesForGraph.add(credentials(provider.defaultCredentialSupplier().get()));
I can't put @provides on on Provider as it is an abstract class, so I ask users to do something in their subclass which is smelly.
I'd like to eliminate the
provideThis()
and could if @Provides` abstract methods were somehow possible. Another way would be to refactor denominator to unwind this in some way I'm not aware of.Thoughts?
The text was updated successfully, but these errors were encountered: