org.unitils.inject.annotation
Annotation Type InjectIntoByType


@Target(value=FIELD)
@Retention(value=RUNTIME)
public @interface InjectIntoByType

Annotation indicating that the the InjectModule should 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 with TestedObject.

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
 PropertyAccess propertyAccess
          The property access that should be used for injection.
 String target
          The name of the field that references the object to which the object in the annotated field should be injected.
 

target

public abstract 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 with TestedObject

Returns:
the target field, null for tested object
Default:
""

propertyAccess

public abstract PropertyAccess propertyAccess
The property access that should be used for injection.

Returns:
the access type, not null
Default:
org.unitils.inject.util.PropertyAccess.DEFAULT


Copyright © 2011. All Rights Reserved.