Package com.google.inject.internal
Class ProviderMethodsModule
java.lang.Object
com.google.inject.internal.ProviderMethodsModule
- All Implemented Interfaces:
Module
Creates bindings to methods annotated with @
Provides
. Use the scope and
binding annotations on the provider method to configure the binding.- Author:
- crazybob@google.com (Bob Lee), jessewilson@google.com (Jesse Wilson)
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Contributes bindings and other configurations for this module tobinder
.boolean
static Module
Returns a module which creates bindings for provider methods from the given module.static Module
forModule
(Object module, ModuleAnnotatedMethodScanner scanner) Returns a module which creates bindings methods in the module that match the scanner.static Module
Returns a module which creates bindings for provider methods from the given object.Class
<?> List
<ProviderMethod<?>> getProviderMethods
(Binder binder) int
hashCode()
boolean
Is it scanning the built-in @Provides* methods.
-
Method Details
-
forModule
Returns a module which creates bindings for provider methods from the given module. -
forModule
Returns a module which creates bindings methods in the module that match the scanner. -
forObject
Returns a module which creates bindings for provider methods from the given object. This is useful notably for GINThis will skip bytecode generation for provider methods, since it is assumed that callers are only interested in Module metadata.
-
getDelegateModuleClass
-
configure
Description copied from interface:Module
Contributes bindings and other configurations for this module tobinder
.Do not invoke this method directly to install submodules. Instead use
Binder.install(Module)
, which ensures thatprovider methods
are discovered. -
getProviderMethods
-
equals
-
hashCode
public int hashCode() -
isScanningBuiltInProvidesMethods
public boolean isScanningBuiltInProvidesMethods()Is it scanning the built-in @Provides* methods. -
getScanner
-