org.unitils.inject.annotation
Annotation Type InjectInto


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

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.

Explicit injection is used, which means that the object is injected to the property indicated by the property() attribute.

Author:
Filip Neven, Tim Ducheyne

Required Element Summary
 String property
          OGNL expression that defines the property to which the object referenced by the annotated field is injected
 
Optional Element Summary
 String target
          The name of the field that references the object to which the object in the annotated field should be injected.
 

Element Detail

property

public abstract String property
OGNL expression that defines the property to which the object referenced by the annotated field is injected

Returns:
the ognl expression, not null

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:
""


Copyright © 2011. All Rights Reserved.