public final class ProviderMethodsModule extends Object implements Module
Provides
. Use the scope and
binding annotations on the provider method to configure the binding.Modifier and Type | Method and Description |
---|---|
void |
configure(Binder binder)
Contributes bindings and other configurations for this module to
binder . |
boolean |
equals(Object o) |
static Module |
forModule(Module 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 |
forObject(Object object)
Returns a module which creates bindings for provider methods from the given object.
|
Object |
getDelegateModule() |
List<ProviderMethod<?>> |
getProviderMethods(Binder binder) |
int |
hashCode() |
public static Module forModule(Module module)
public static Module forModule(Object module, ModuleAnnotatedMethodScanner scanner)
public static Module forObject(Object object)
This will skip bytecode generation for provider methods, since it is assumed that callers are only interested in Module metadata.
public Object getDelegateModule()
public void configure(Binder binder)
Module
binder
.
Do not invoke this method directly to install submodules. Instead use
Binder.install(Module)
, which ensures that provider methods
are
discovered.
public List<ProviderMethod<?>> getProviderMethods(Binder binder)
Copyright © 2006–2018 Google, Inc.. All rights reserved.