Class BeanPropertiesELResolver
- Author:
- Guillaume Smet
-
Field Summary
Fields inherited from class jakarta.el.ELResolver
RESOLVABLE_AT_DESIGN_TIME, TYPE -
Method Summary
Methods inherited from class jakarta.el.BeanELResolver
getCommonPropertyType, getFeatureDescriptors, getType, getValue, isReadOnly, setValueMethods inherited from class jakarta.el.ELResolver
convertToType
-
Method Details
-
invoke
public Object invoke(ELContext context, Object base, Object methodName, Class<?>[] paramTypes, Object[] params) Description copied from class:BeanELResolverIf the base object is notnull, invoke the method, with the given parameters on this bean. The return value from the method is returned.If the base is not
null, thepropertyResolvedproperty of theELContextobject must be set totrueby this resolver, before returning. If this property is nottrueafter this method is called, the caller should ignore the return value.The provided method object will first be coerced to a
String. The methods in the bean is then examined and an attempt will be made to select one for invocation. If no suitable can be found, aMethodNotFoundExceptionis thrown. If the given paramTypes is notnull, select the method with the given name and parameter types. Else select the method with the given name that has the same number of parameters. If there are more than one such method, the method selection process is undefined. Else select the method with the given name that takes a variable number of arguments. Note the resolution for overloaded methods will likely be clarified in a future version of the spec. The provide parameters are coerced to the corresponding parameter types of the method, and the method is then invoked.- Overrides:
invokein classBeanELResolver- Parameters:
context- The context of this evaluation.base- The bean on which to invoke the methodmethodName- The simple name of the method to invoke. Will be coerced to aString. If method is "<init>"or "<clinit>" a MethodNotFoundException is thrown.paramTypes- An array of Class objects identifying the method's formal parameter types, in declared order. Use an empty array if the method has no parameters. Can benull, in which case the method's formal parameter types are assumed to be unknown.params- The parameters to pass to the method, ornullif no parameters.- Returns:
- The result of the method invocation (
nullif the method has avoidreturn type).
-