Interface JexlMethod
public interface JexlMethod
Interface used for regular method invocation.
Ex.
${foo.bar()}
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionClass<?> returns the return type of the method invoked.Invocation method, called when the method invocation should be performed and a value returned.booleanSpecifies if this JexlMethod is cacheable and able to be reused for this class of object it was returned for.booleanChecks whether a tryInvoke return value indicates a failure or not.Attempts to reuse this JexlMethod, checking that it is compatible with the actual set of arguments.
-
Method Details
-
getReturnType
-
invoke
-
isCacheable
boolean isCacheable()Specifies if this JexlMethod is cacheable and able to be reused for this class of object it was returned for.- Returns:
- true if can be reused for this class, false if not
-
tryFailed
-
tryInvoke
Attempts to reuse this JexlMethod, checking that it is compatible with the actual set of arguments. Related to isCacheable since this method is often used with cached JexlMethod instances.- Parameters:
name- the method nameobj- the object to invoke the method uponparams- the method arguments- Returns:
- the result of the method invocation that should be checked by tryFailed to determine if it succeeded or failed.
- Throws:
JexlException.TryFailed- if the underlying method was invoked but threw an exception (InvocationTargetException)
-