Class ObjectMethodAccessor

  • All Implemented Interfaces:
    MethodAccessor

    public class ObjectMethodAccessor
    extends Object
    implements MethodAccessor
    Implementation of PropertyAccessor that uses reflection on the target object's class to find a field or a pair of set/get methods with the given property name.
    • Constructor Detail

      • ObjectMethodAccessor

        public ObjectMethodAccessor()
    • Method Detail

      • callStaticMethod

        public Object callStaticMethod​(Map<String,​Object> context,
                                       Class<?> targetClass,
                                       String methodName,
                                       Object[] args)
                                throws MethodFailedException
        Calls the static method named with the arguments given on the class given.
        Specified by:
        callStaticMethod in interface MethodAccessor
        Parameters:
        context - expression context in which the method should be called
        targetClass - the object in which the method exists
        methodName - the name of the method
        args - the arguments to the method
        Returns:
        result of calling the method
        Throws:
        MethodFailedException