| java.lang.Object org.apache.commons.betwixt.expression.MethodExpression
MethodExpression | public class MethodExpression implements Expression(Code) | | MethodExpression evaluates a method on the current bean context.
author: James Strachan version: $Revision: 471234 $ |
NULL_ARGUMENTS | protected static Object[] NULL_ARGUMENTS(Code) | | null arguments
|
NULL_CLASSES | protected static Class[] NULL_CLASSES(Code) | | null classes
|
MethodExpression | public MethodExpression()(Code) | | Base constructor
|
MethodExpression | public MethodExpression(Method method)(Code) | | Convenience constructor sets method property
Parameters: method - the Method whose return value when invoked on the bean will the value of this expression |
evaluate | public Object evaluate(Context context)(Code) | | Evaluate by calling the read method on the current bean
Parameters: context - the context against which this expression will be evaluated the value returned by the method when it's invoked on the context's bean,so long as the method can be invoked.Otherwise, null. |
findAlternateMethod | protected Method findAlternateMethod(Class type, Method method)(Code) | | Tries to find an alternate method for the given type using interfaces
which gets around the problem of inner classes,
such as on Map.Entry implementations.
Parameters: type - the Class whose methods are to be searched Parameters: method - the Method for which an alternative is to be search for the alternative Method, if one can be found. Otherwise null. |
getMethod | public Method getMethod()(Code) | | Gets the method used to evaluate this expression.
the method whose value (when invoked against the context's bean) will be used to evaluate this expression. |
handleException | protected void handleException(Context context, Exception e, Method m)(Code) | | Log error to context's logger.
Allows derived objects to handle exceptions differently.
Parameters: context - the Context being evaluated when the exception occured Parameters: e - the exception to handle since: 0.8 |
handleException | protected void handleException(Context context, Exception e)(Code) | | Log error to context's logger.
Allows derived objects to handle exceptions differently.
Parameters: context - the Context being evaluated when the exception occured Parameters: e - the exception to handle |
setMethod | public void setMethod(Method method)(Code) | | Sets the method used to evaluate this expression
Parameters: method - method whose value (when invoked against the context's bean) will be used to evaluate this expression |
toString | public String toString()(Code) | | Returns something useful for logging.
something useful for logging |
|
|