Class ELMethodDiagnostics
MethodNotFoundException of a method that no executor and no resolver of the chain could
resolve, saying why each of the descriptions a method can be reached through did not answer.
A method is dispatched from the bean introspection of its type, from the executable metadata of its bean
definition, or reflectively, and each of the three has a precondition an application can fail to meet: the
type is not @Introspected, the method is not @Executable, the ELContext carries no
bean context for the executable metadata to be read from, or the optional reflection module is not on the
classpath. Reporting only the name of the method leaves an author of an expression with no way to tell which
of them it was, and the one that is the least visible — a context carrying no bean context, which makes
ExecutableMethodELExecutor decline silently — is the one that reads as a method that plainly exists
not being found.
Nothing here runs on the happy path. Every check is made once, on the path that is about to throw, and none of it changes what resolves: an executor that declined goes on declining, and this only describes the decline.
- Since:
- 1.1
- Author:
- Denis Stepanov
-
Method Summary
Modifier and TypeMethodDescriptionstatic jakarta.el.MethodNotFoundExceptionThe exception of a method the resolver chain of a context did not resolve.static jakarta.el.MethodNotFoundExceptionnotFound(jakarta.el.ELContext context, Object base, Object method, Object @Nullable [] arguments, List<? extends ELMethodExecutor> executors) The exception of a method none of the executors of an expression parsed at runtime resolved.
-
Method Details
-
notFound
public static jakarta.el.MethodNotFoundException notFound(jakarta.el.ELContext context, Object base, Object method, Object @Nullable [] arguments) The exception of a method the resolver chain of a context did not resolve.The reflection module is not reported as a remedy for this path: the chain is not the executors, and the standard one ends in the reflective resolvers, so a method that reached the end of it was looked up reflectively already.
- Parameters:
context- The context the expression was evaluated withbase- The base object, or anELClassfor a static methodmethod- The method namearguments- The evaluated arguments- Returns:
- The exception to throw
-
notFound
public static jakarta.el.MethodNotFoundException notFound(jakarta.el.ELContext context, Object base, Object method, Object @Nullable [] arguments, List<? extends ELMethodExecutor> executors) The exception of a method none of the executors of an expression parsed at runtime resolved.- Parameters:
context- The context the expression was evaluated withbase- The base object, or anELClassfor a static methodmethod- The method namearguments- The evaluated argumentsexecutors- The executors that were consulted, in order- Returns:
- The exception to throw
-