Class MethodInjectableFactory


  • public class MethodInjectableFactory
    extends java.lang.Object
    Constructs Injectables for Methods part of a specific owner Type.
    • Method Detail

      • create

        public <T> Injectable<T> create​(java.lang.reflect.Method method,
                                        java.lang.reflect.Type ownerType)
                                 throws DefinitionException
        Creates a new Injectable.
        Type Parameters:
        T - the type of the given method's return type
        Parameters:
        method - a Method, cannot be null
        ownerType - the type of the owner of the method, cannot be null and must match with Method.getDeclaringClass()
        Returns:
        a new Injectable, never null
        Throws:
        DefinitionException - when a definition problem was encountered