Package org.omnifaces.el
Class MethodReference
- java.lang.Object
-
- jakarta.el.MethodInfo
-
- org.omnifaces.el.MethodReference
-
public class MethodReference extends MethodInfo
This encapsulates information about an EL method expression.- Since:
- 1.4, 2.5 also extends MethodInfo
-
-
Constructor Summary
Constructors Constructor Description MethodReference(Object base, Method method)
Construct a method reference.MethodReference(Object base, Method method, Object[] actualParameters, boolean fromMethod)
Construct a method reference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object[]
getActualParameters()
Returns the actual (evaluated) parameters of the method call.Object
getBase()
Returns the base of the EL method expression.Method
getMethod()
Returns the concreteMethod
instance of the EL method expression.boolean
isFromMethod()
Returnstrue
if this method reference is from an actual method call and not from a getter of a property.-
Methods inherited from class jakarta.el.MethodInfo
getName, getParamTypes, getReturnType
-
-
-
-
Field Detail
-
NO_PARAMS
public static final Object[] NO_PARAMS
An object array representing "no method parameters".
-
-
Constructor Detail
-
MethodReference
public MethodReference(Object base, Method method)
Construct a method reference.- Parameters:
base
- The base of the EL method expression.method
- The concreteMethod
instance of the EL method expression.
-
MethodReference
public MethodReference(Object base, Method method, Object[] actualParameters, boolean fromMethod)
Construct a method reference.- Parameters:
base
- The base of the EL method expression.method
- The concreteMethod
instance of the EL method expression.actualParameters
- The actual (evaluated) parameters of the method call.fromMethod
- Whether this method reference is from an actual method call and not from a getter of a property.
-
-
Method Detail
-
getBase
public Object getBase()
Returns the base of the EL method expression. Usually, this is the backing bean on which the method behindgetMethod()
should be invoked.- Returns:
- The base of the EL method expression.
-
getMethod
public Method getMethod()
Returns the concreteMethod
instance of the EL method expression. Usually, this is a method of the class behindgetBase()
.- Returns:
- The concrete
Method
instance of the EL method expression.
-
getActualParameters
public Object[] getActualParameters()
Returns the actual (evaluated) parameters of the method call. If there are no params, then this returns an empty array, nevernull
. Those should be passed toMethod.invoke(Object, Object...)
.- Returns:
- The actual (evaluated) parameters of the method call.
-
isFromMethod
public boolean isFromMethod()
Returnstrue
if this method reference is from an actual method call and not from a getter of a property.- Returns:
true
if this method reference is from an actual method call and not from a getter of a property.
-
-