Interface InjectionTargetExtension<T,​E>

  • Type Parameters:
    T - the type handled
    E - the element type required

    public interface InjectionTargetExtension<T,​E>
    An interface to allow for custom handling of injection targets of type T. The target class must be an interface with at least one type variable.

    Whenever an injection target of type T needs injection this extension will be called to provide the actual value.

    • Method Detail

      • getTargetClass

        java.lang.Class<?> getTargetClass()
        Returns the target class extended by this extension.
        Returns:
        a Class, never null
      • getElementType

        java.lang.reflect.Type getElementType​(java.lang.reflect.Type type)
        Returns the element type of the given type by unwrapping the given type. Returning null or the same type is not allowed.
        Parameters:
        type - a Type to unwrap, cannot be null
        Returns:
        the element type of the given type by unwrapping the given type, never null
      • getTypeTraits

        java.util.Set<TypeTrait> getTypeTraits()
        Returns the TypeTraits of this extension.
        Returns:
        a set of TypeTrait, never null or contains null, but can be empty