public abstract class Injector extends Object
IFieldValueFactory
can provide a value for a field; if it can, the field is set to that
value. Injector will ignore all non-null fields.Constructor and Description |
---|
Injector() |
Modifier and Type | Method and Description |
---|---|
void |
bind(Application application)
Binds current instance of the injector to the Application.
|
static Injector |
get() |
abstract void |
inject(Object object)
Injects the specified object.
|
protected void |
inject(Object object,
IFieldValueFactory factory)
traverse fields in the class hierarchy of the object and set their value with a locator
provided by the locator factory.
|
public void bind(Application application)
get()
whenever the
specified application object is active in the thread.application
- public static Injector get()
public abstract void inject(Object object)
inject(Object, IFieldValueFactory)
with some IFieldValueFactory
object
- inject(Object, IFieldValueFactory)
protected void inject(Object object, IFieldValueFactory factory)
object
- factory
- Copyright © 2006–2022 Apache Software Foundation. All rights reserved.