Interface ExecutionHandleLocator

    • Method Detail

      • findExecutionHandle

        default <T,​R> java.util.Optional<MethodExecutionHandle<T,​R>> findExecutionHandle​(java.lang.Class<T> beanType,
                                                                                                     java.lang.String method,
                                                                                                     java.lang.Class... arguments)
        Finds an optimized execution handle for invoking a bean method. The execution handle may or may not be implemented by generated byte code.
        Type Parameters:
        T - The target bean
        R - The result type of the execution handle
        Parameters:
        beanType - The bean type
        method - The method
        arguments - The arguments
        Returns:
        The execution handle
      • findExecutionHandle

        default <T,​R> java.util.Optional<MethodExecutionHandle<T,​R>> findExecutionHandle​(java.lang.Class<T> beanType,
                                                                                                     Qualifier<?> qualifier,
                                                                                                     java.lang.String method,
                                                                                                     java.lang.Class... arguments)
        Finds an optimized execution handle for invoking a bean method. The execution handle may or may not be implemented by generated byte code.
        Type Parameters:
        T - The target bean
        R - The result type of the execution handle
        Parameters:
        beanType - The bean type
        qualifier - The bean qualifer
        method - The method
        arguments - The arguments
        Returns:
        The execution handle
      • findExecutionHandle

        default <T,​R> java.util.Optional<MethodExecutionHandle<T,​R>> findExecutionHandle​(T bean,
                                                                                                     java.lang.String method,
                                                                                                     java.lang.Class... arguments)
        Finds an optimized execution handle for invoking a bean method. The execution handle may or may not be implemented by generated byte code.
        Type Parameters:
        T - The target bean
        R - The result type of the execution handle
        Parameters:
        bean - The bean to invoke the method on
        method - The method
        arguments - The arguments
        Returns:
        The execution handle
      • findExecutableMethod

        default <T,​R> java.util.Optional<ExecutableMethod<T,​R>> findExecutableMethod​(java.lang.Class<T> beanType,
                                                                                                 java.lang.String method,
                                                                                                 java.lang.Class... arguments)
        Finds an optimized execution handle for invoking a bean method. The execution handle may or may not be implemented by generated byte code.
        Type Parameters:
        T - The bean type class
        R - The result type of the execution handle
        Parameters:
        beanType - The bean type
        method - The method
        arguments - The arguments
        Returns:
        The execution handle
      • findProxyTargetMethod

        default <T,​R> java.util.Optional<ExecutableMethod<T,​R>> findProxyTargetMethod​(java.lang.Class<T> beanType,
                                                                                                  java.lang.String method,
                                                                                                  java.lang.Class... arguments)
        Finds the original unproxied method for a ProxyBeanDefinition.
        Type Parameters:
        T - The bean type class
        R - The result type of the execution handle
        Parameters:
        beanType - The bean type
        method - The method
        arguments - The arguments
        Returns:
        The execution handle
      • findProxyTargetMethod

        default <T,​R> java.util.Optional<ExecutableMethod<T,​R>> findProxyTargetMethod​(java.lang.Class<T> beanType,
                                                                                                  Qualifier<T> qualifier,
                                                                                                  java.lang.String method,
                                                                                                  java.lang.Class... arguments)
        Finds the original unproxied method for a ProxyBeanDefinition.
        Type Parameters:
        T - The bean type class
        R - The result type of the execution handle
        Parameters:
        beanType - The bean type
        qualifier - The qualifier
        method - The method
        arguments - The arguments
        Returns:
        The execution handle
      • findProxyTargetMethod

        default <T,​R> java.util.Optional<ExecutableMethod<T,​R>> findProxyTargetMethod​(io.micronaut.core.type.Argument<T> beanType,
                                                                                                  Qualifier<T> qualifier,
                                                                                                  java.lang.String method,
                                                                                                  java.lang.Class... arguments)
        Finds the original unproxied method for a ProxyBeanDefinition.
        Type Parameters:
        T - The bean type class
        R - The result type of the execution handle
        Parameters:
        beanType - The bean type
        qualifier - The qualifier
        method - The method
        arguments - The arguments
        Returns:
        The execution handle
      • getExecutableMethod

        default <T,​R> ExecutableMethod<T,​R> getExecutableMethod​(java.lang.Class<T> beanType,
                                                                            java.lang.String method,
                                                                            java.lang.Class... arguments)
                                                                     throws java.lang.NoSuchMethodException
        Finds an optimized execution handle for invoking a bean method. The execution handle may or may not be implemented by generated byte code.
        Type Parameters:
        T - The bean type class
        R - The result type of the execution handle
        Parameters:
        beanType - The bean type
        method - The method
        arguments - The arguments
        Returns:
        The execution handle
        Throws:
        java.lang.NoSuchMethodException - if the method cannot be found
      • getProxyTargetMethod

        default <T,​R> ExecutableMethod<T,​R> getProxyTargetMethod​(java.lang.Class<T> beanType,
                                                                             java.lang.String method,
                                                                             java.lang.Class... arguments)
                                                                      throws java.lang.NoSuchMethodException
        Finds an optimized execution handle for invoking a bean method. The execution handle may or may not be implemented by generated byte code.
        Type Parameters:
        T - The bean type class
        R - The result type of the execution handle
        Parameters:
        beanType - The bean type
        method - The method
        arguments - The arguments
        Returns:
        The execution handle
        Throws:
        java.lang.NoSuchMethodException - if the method cannot be found
      • getProxyTargetMethod

        default <T,​R> ExecutableMethod<T,​R> getProxyTargetMethod​(java.lang.Class<T> beanType,
                                                                             Qualifier<T> qualifier,
                                                                             java.lang.String method,
                                                                             java.lang.Class... arguments)
                                                                      throws java.lang.NoSuchMethodException
        Finds an optimized execution handle for invoking a bean method. The execution handle may or may not be implemented by generated byte code.
        Type Parameters:
        T - The bean type class
        R - The result type of the execution handle
        Parameters:
        beanType - The bean type
        qualifier - The qualifier
        method - The method
        arguments - The arguments
        Returns:
        The execution handle
        Throws:
        java.lang.NoSuchMethodException - if the method cannot be found
      • getProxyTargetMethod

        default <T,​R> ExecutableMethod<T,​R> getProxyTargetMethod​(io.micronaut.core.type.Argument<T> beanType,
                                                                             Qualifier<T> qualifier,
                                                                             java.lang.String method,
                                                                             java.lang.Class... arguments)
                                                                      throws java.lang.NoSuchMethodException
        Finds an optimized execution handle for invoking a bean method. The execution handle may or may not be implemented by generated byte code.
        Type Parameters:
        T - The bean type class
        R - The result type of the execution handle
        Parameters:
        beanType - The bean type
        qualifier - The qualifier
        method - The method
        arguments - The arguments
        Returns:
        The execution handle
        Throws:
        java.lang.NoSuchMethodException - if the method cannot be found
        Since:
        3.0.0
      • getExecutionHandle

        default <T,​R> MethodExecutionHandle<T,​R> getExecutionHandle​(java.lang.Class<T> beanType,
                                                                                java.lang.String method,
                                                                                java.lang.Class... arguments)
                                                                         throws java.lang.NoSuchMethodException
        Finds an optimized execution handle for invoking a bean method. The execution handle may or may not be implemented by generated byte code.
        Type Parameters:
        T - The target bean
        R - The result type of the execution handle
        Parameters:
        beanType - The bean type
        method - The method
        arguments - The arguments
        Returns:
        The execution handle
        Throws:
        java.lang.NoSuchMethodException - if the method cannot be found
      • getExecutionHandle

        default <T,​R> MethodExecutionHandle<T,​R> getExecutionHandle​(T bean,
                                                                                java.lang.String method,
                                                                                java.lang.Class... arguments)
                                                                         throws java.lang.NoSuchMethodException
        Finds an optimized execution handle for invoking a bean method. The execution handle may or may not be implemented by generated byte code.
        Type Parameters:
        T - The target bean
        R - The result type of the execution handle
        Parameters:
        bean - The bean to invoke the method on
        method - The method
        arguments - The arguments
        Returns:
        The execution handle
        Throws:
        java.lang.NoSuchMethodException - if the method cannot be found
      • createExecutionHandle

        default MethodExecutionHandle<?,​java.lang.Object> createExecutionHandle​(BeanDefinition<?> beanDefinition,
                                                                                      ExecutableMethod<java.lang.Object,​?> method)
        Create an execution handle for the given bean definition and method.
        Parameters:
        beanDefinition - The bean definition
        method - The method
        Returns:
        The execution handle