public class Injector extends Destroyable
| Modifier and Type | Class and Description |
|---|---|
class |
Injector.Builder<T>
Represents an injection builder.
|
static interface |
Injector.Constructor<T>
Represents an instance constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
destroy()
Attempts to "destroy" the object by clearing memory (e.g.
|
<T> Injector.Builder<T> |
inject(Class<T> fieldClass)
Creates a new injection builder to set up a new field injection configuration.
|
void |
inject(Module module)
Injects the given module instance with its dependencies.
|
void |
inject(ModuleRegistry.Entry moduleEntry)
Injects the given module registry entry with its dependencies.
|
public <T> Injector.Builder<T> inject(Class<T> fieldClass)
T - The type of the field, used to limit instances to their proper typefieldClass - The type of fields this configuration / builder should affectpublic void inject(ModuleRegistry.Entry moduleEntry) throws InjectFailedException
moduleEntry - The entry to injectInjectFailedException - if the injection failspublic void inject(Module module) throws InjectFailedException
module - The module instanceInjectFailedException - if the injection failsprotected void destroy()
Destroyabledestroy in class DestroyableCopyright © 2014–2015 MountainBlade. All rights reserved.