Package org.camunda.bpm.engine.impl.javax.el

Examples of org.camunda.bpm.engine.impl.javax.el.MethodNotFoundException


    paramValues = params.eval(bindings, context);

    context.setPropertyResolved(false);
    Object result = context.getELResolver().invoke(context, base, name, paramTypes, paramValues);
    if (!context.isPropertyResolved()) {
      throw new MethodNotFoundException(LocalMessages.get("error.property.method.notfound", name, base.getClass()));
    }
//    if (returnType != null && !returnType.isInstance(result)) { // should we check returnType for method invocations?
//      throw new MethodNotFoundException(LocalMessages.get("error.property.method.notfound", name, base.getClass()));
//    }
    return result;
View Full Code Here


  protected Method findMethod(String name, Class<?> clazz, Class<?> returnType, Class<?>[] paramTypes) {
    Method method = null;
    try {
      method = clazz.getMethod(name, paramTypes);
    } catch (NoSuchMethodException e) {
      throw new MethodNotFoundException(LocalMessages.get("error.property.method.notfound", name, clazz));
    }
    if (returnType != null && !returnType.isAssignableFrom(method.getReturnType())) {
      throw new MethodNotFoundException(LocalMessages.get("error.property.method.notfound", name, clazz));
    }
    return method;
  }
View Full Code Here

  }

  protected Method getMethod(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes) {
    Object value = eval(bindings, context);
    if (value == null) {
      throw new MethodNotFoundException(LocalMessages.get("error.identifier.method.notfound", name));
    }
    if (value instanceof Method) {
      Method method = (Method)value;
      if (returnType != null && !returnType.isAssignableFrom(method.getReturnType())) {
        throw new MethodNotFoundException(LocalMessages.get("error.identifier.method.notfound", name));
      }
      if (!Arrays.equals(method.getParameterTypes(), paramTypes)) {
        throw new MethodNotFoundException(LocalMessages.get("error.identifier.method.notfound", name));
      }
      return method;
    }
    throw new MethodNotFoundException(LocalMessages.get("error.identifier.method.notamethod", name, value.getClass()));
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.javax.el.MethodNotFoundException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.