Search in sources :

Example 1 with MethodInfo

use of org.camunda.bpm.engine.impl.javax.el.MethodInfo in project camunda-bpm-platform by camunda.

the class AstProperty method getMethodInfo.

public MethodInfo getMethodInfo(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes) {
    Object base = prefix.eval(bindings, context);
    if (base == null) {
        throw new PropertyNotFoundException(LocalMessages.get("error.property.base.null", prefix));
    }
    Object property = getProperty(bindings, context);
    if (property == null && strict) {
        throw new PropertyNotFoundException(LocalMessages.get("error.property.method.notfound", "null", base));
    }
    String name = bindings.convert(property, String.class);
    Method method = findMethod(name, base.getClass(), returnType, paramTypes);
    return new MethodInfo(method.getName(), method.getReturnType(), paramTypes);
}
Also used : PropertyNotFoundException(org.camunda.bpm.engine.impl.javax.el.PropertyNotFoundException) MethodInfo(org.camunda.bpm.engine.impl.javax.el.MethodInfo) Method(java.lang.reflect.Method)

Aggregations

Method (java.lang.reflect.Method)1 MethodInfo (org.camunda.bpm.engine.impl.javax.el.MethodInfo)1 PropertyNotFoundException (org.camunda.bpm.engine.impl.javax.el.PropertyNotFoundException)1