Annotation Type InjectInto


  • @Target(FIELD)
    @Retention(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

      Required Elements 
      Modifier and Type Required Element Description
      String property
      OGNL expression that defines the property to which the object referenced by the annotated field is injected
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      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

        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

        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:
        {}