public class MethodFunction extends SerializableMethod implements Function
ExpressionFactory
The user of XEL expressions rarely need it.| Constructor and Description |
|---|
MethodFunction(Method method) |
| Modifier and Type | Method and Description |
|---|---|
Class<?>[] |
getParameterTypes()
Returns an array of Class objects that represent the formal
parameter types, in declaration order, of the method represented
by this Method object.
|
Class<?> |
getReturnType()
Returns a Class object that represents the formal return type
of the method
represented by this Method object.
|
Object |
invoke(Object obj,
Object... args)
Invokes this method with the specified arguments.
|
Method |
toMethod()
Converts this function to a method, or null if unable to convert.
|
public MethodFunction(Method method)
public Class<?>[] getParameterTypes()
FunctionReturns an array of length 0 if the underlying method takes no parameters.
getParameterTypes in interface Functionpublic Class<?> getReturnType()
FunctiongetReturnType in interface Functionpublic Object invoke(Object obj, Object... args) throws Exception
Functioninvoke in interface Functionobj - the object the underlying method is invoked from.
It is always null if this function is invoked in an XEL expression.
It is reserved for more sophisticated expressions, such as
ZK Spreadsheet's expressions.args - the arguments used for the method call.
If null, an Object array with zero length is assumed.ExceptionCopyright © 2018. All rights reserved.