Interface ExecutableMethodsDefinition<T>

Type Parameters:
T - The bean type
All Known Implementing Classes:
AbstractExecutableMethodsDefinition

@Internal public interface ExecutableMethodsDefinition<T>
Collects a set of executable methods ExecutableMethod.
Since:
3.0
Author:
Denis Stepanov
  • Method Details

    • findMethod

      <R> Optional<ExecutableMethod<T,R>> findMethod(String name, Class<?>... argumentTypes)
      Finds a single ExecutableMethod for the given name and argument types.
      Type Parameters:
      R - The return type
      Parameters:
      name - The method name
      argumentTypes - The argument types
      Returns:
      An optional ExecutableMethod
    • findPossibleMethods

      <R> Stream<ExecutableMethod<T,R>> findPossibleMethods(String name)
      Finds possible methods for the given method name.
      Type Parameters:
      R - The return type
      Parameters:
      name - The method name
      Returns:
      The possible methods
    • getExecutableMethods

      List<ExecutableMethod<T,?>> getExecutableMethods()
      Returns:
      The ExecutableMethod instances for this definition
    • getPostConstructExecutableMethods

      default List<ExecutableMethod<T,?>> getPostConstructExecutableMethods()
      The PostConstruct callbacks of the bean, in invocation order, when the bean intercepts its post-construct phase. They are not part of getExecutableMethods().
      Returns:
      The post-construct callbacks, or an empty list when none were compiled in
      Since:
      5.2.0
    • getPreDestroyExecutableMethods

      default List<ExecutableMethod<T,?>> getPreDestroyExecutableMethods()
      The PreDestroy callbacks of the bean, in invocation order, when the bean intercepts its pre-destroy phase. They are not part of getExecutableMethods().
      Returns:
      The pre-destroy callbacks, or an empty list when none were compiled in
      Since:
      5.2.0
    • requiresMethodProcessing

      default boolean requiresMethodProcessing()
      By default, when the BeanContext is started, the BeanDefinition.getExecutableMethods() are not processed by registered ExecutableMethodProcessor instances unless this method returns true.
      Returns:
      Whether the bean definition requires method processing
      Since:
      5.1.0
      See Also:
    • getExecutableMethodByIndex

      @NextMajorVersion("Remove default method in v6") default <R> ExecutableMethod<T,R> getExecutableMethodByIndex(int index)
      Retrieves an ExecutableMethod from the collection of executable methods by the specified index.
      Parameters:
      index - The index of the ExecutableMethod to retrieve
      Returns:
      The ExecutableMethod at the specified index