9867f9c2142355ae958f9eeb8fb96811082c8812 |
|
02-Feb-2015 |
sameb <sameb@google.com> |
Implement my old patch for issue #366, with some tweaks. This does the following: * Fixes @Provides injection so that parameters are checked for nullability. By default this will error. The flag is named: guice_check_nullable_provides_params and can be set to ERROR, WARNING or IGNORE. * Adds InjectionPoint.forMethod to build an InjectionPoint off an arbitrary method. * Adds Binder.getProvider(Dependency) to a get a Provider for a given dependency (with all its nullability & injection points maintained). * Update ProviderLookup to accept a Dependency in addition to a Key. This is in preparation for two things: 1) Allowing multibindings/mapbindings/optionalbindings to be specified as annotations on methods in a module. 2) Adding a dagger compatibility module. ... the general idea will be that I'll also add a hook into ProvidesMethodModule somehow to look at arbitrary other annotations and let folks process them specially. ------------- Created by MOE: http://code.google.com/p/moe-java MOE_MIGRATED_REVID=85353820
/external/guice/core/src/com/google/inject/internal/LookupProcessor.java
|