|
Carrot2 v3.5.2
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.util.attribute.AttributeBinderInjector
public class AttributeBinderInjector
A very simple field value injector based on the AttributeBinder. The injector
can recursively inject values to the designated non-static fields of the root injection
receiver object. Such an injector can be useful to set references to common resources
(e.g. internal processing contexts) on an object hierarchy.
| Constructor Summary | |
|---|---|
AttributeBinderInjector()
|
|
| Method Summary | |
|---|---|
static void |
injectByType(Class<? extends Annotation> injectableMarker,
Map<Class<?>,Object> values,
Object... objects)
Injects values to an object's non-static fields by value type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AttributeBinderInjector()
| Method Detail |
|---|
public static void injectByType(Class<? extends Annotation> injectableMarker,
Map<Class<?>,Object> values,
Object... objects)
injectableMarker - a marker interface that designates injection receiversvalues - a mapping between field type and the value to set, null
values are allowed and will be transferred to the object's fields. If
the map does not contain a key equal an object field's type, the field's
value will not be changed.objects - All objects whose fields should be set. Objects must be marked with the
injectableMarker annotation. All objects' fields whose
types are marked with the injectableMarker will also
recursively receive value injection.
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||