ognl
public class ObjectMethodAccessor extends java.lang.Object implements MethodAccessor
Constructor and Description |
---|
ObjectMethodAccessor() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
callMethod(java.util.Map context,
java.lang.Object target,
java.lang.String methodName,
java.lang.Object[] args)
Calls the method named with the arguments given.
|
java.lang.Object |
callStaticMethod(java.util.Map context,
java.lang.Class targetClass,
java.lang.String methodName,
java.lang.Object[] args)
Calls the static method named with the arguments given on the class given.
|
public java.lang.Object callStaticMethod(java.util.Map context, java.lang.Class targetClass, java.lang.String methodName, java.lang.Object[] args) throws MethodFailedException
MethodAccessor
callStaticMethod
in interface MethodAccessor
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 methodMethodFailedException
- if there is an error calling the methodpublic java.lang.Object callMethod(java.util.Map context, java.lang.Object target, java.lang.String methodName, java.lang.Object[] args) throws MethodFailedException
MethodAccessor
callMethod
in interface MethodAccessor
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 methodMethodFailedException
- if there is an error calling the method