org.apache.ibatis.ognl
Class ObjectMethodAccessor
java.lang.Object
org.apache.ibatis.ognl.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.
- Author:
- Luke Blanshard ([email protected]), Drew Davidson ([email protected])
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectMethodAccessor
public ObjectMethodAccessor()
callStaticMethod
public Object callStaticMethod(Map context,
Class targetClass,
String methodName,
Object[] args)
throws MethodFailedException
- Description copied from interface:
MethodAccessor
- 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 calledtargetClass
- the object in which the method existsmethodName
- the name of the methodargs
- the arguments to the method
- Throws:
MethodFailedException
- if there is an error calling the method
callMethod
public Object callMethod(Map context,
Object target,
String methodName,
Object[] args)
throws MethodFailedException
- Description copied from interface:
MethodAccessor
- Calls the method named with the arguments given.
- Specified by:
callMethod
in interface MethodAccessor
- Parameters:
context
- expression context in which the method should be calledtarget
- the object in which the method existsmethodName
- the name of the methodargs
- the arguments to the method
- Throws:
MethodFailedException
- if there is an error calling the method
Copyright © 2010. All Rights Reserved.