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> @NonNull Optional<ExecutableMethod<T, R>> findMethod(@NonNull String name, @NonNull Class<?>... argumentTypes) Finds a singleExecutableMethodfor the given name and argument types.<R> @NonNull Stream<ExecutableMethod<T, R>> findPossibleMethods(@NonNull String name) Finds possible methods for the given method name.default <R> @NonNull ExecutableMethod<T, R> getExecutableMethodByIndex(int index) Retrieves anExecutableMethodfrom the collection of executable methods by the specified index.@NonNull List<ExecutableMethod<T, ?>>
-
Method Details
-
findMethod
<R> @NonNull Optional<ExecutableMethod<T,R>> findMethod(@NonNull String name, @NonNull Class<?>... argumentTypes) 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
@NonNull List<ExecutableMethod<T,?>> getExecutableMethods()- Returns:
- The
ExecutableMethodinstances for this definition
-
getExecutableMethodByIndex
@NextMajorVersion("Remove default method in v6") default <R> @NonNull 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
-