Package io.micronaut.inject
Interface ExecutableMethodsDefinition<T>
- Type Parameters:
T- The bean type
- All Known Implementing Classes:
AbstractExecutableMethodsDefinition
Collects a set of executable methods
ExecutableMethod.- Since:
- 3.0
- Author:
- Denis Stepanov
-
Method Summary
Modifier and TypeMethodDescription<R> Optional<ExecutableMethod<T, R>> findMethod(String name, Class<?>... argumentTypes) Finds a singleExecutableMethodfor the given name and argument types.<R> Stream<ExecutableMethod<T, R>> findPossibleMethods(String name) Finds possible methods for the given method name.default <R> ExecutableMethod<T, R> getExecutableMethodByIndex(int index) Retrieves anExecutableMethodfrom the collection of executable methods by the specified index.List<ExecutableMethod<T, ?>>
-
Method Details
-
findMethod
Finds a singleExecutableMethodfor the given name and argument types.- Type Parameters:
R- The return type- Parameters:
name- The method nameargumentTypes- The argument types- Returns:
- An optional
ExecutableMethod
-
findPossibleMethods
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
ExecutableMethodinstances for this definition
-
getExecutableMethodByIndex
@NextMajorVersion("Remove default method in v6") default <R> ExecutableMethod<T,R> getExecutableMethodByIndex(int index) Retrieves anExecutableMethodfrom the collection of executable methods by the specified index.- Parameters:
index- The index of theExecutableMethodto retrieve- Returns:
- The
ExecutableMethodat the specified index
-