Package org.unitils.inject.annotation
Annotation Type InjectIntoByType
-
@Target(FIELD) @Retention(RUNTIME) public @interface InjectIntoByType
Annotation indicating that the theInjectModuleshould try to inject the object assigned to the annotated field to the object defined by the target attribute (or the object(s) assigned to the field annotated withTestedObject. Automatic injection by type is used, which means that the object is injected to the most specific property with an assignable type.- Author:
- Filip Neven, Tim Ducheyne
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description PropertyAccesspropertyAccessThe property access that should be used for injection.String[]targetThe name of the field that references the object to which the object in the annotated field should be injected.
-
-
-
Element Detail
-
target
String[] target
The name of the field that references the object to which the object in the annotated field should be injected. If not specified, the target is defined by the field annotated withTestedObject- Returns:
- the target field, null for tested object
- Default:
- {}
-
-
-
propertyAccess
PropertyAccess propertyAccess
The property access that should be used for injection.- Returns:
- the access type, not null
- Default:
- org.unitils.inject.util.PropertyAccess.DEFAULT
-
-