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

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


   */
  public Bindings bind(FunctionMapper fnMapper, VariableMapper varMapper, TypeConverter converter) {
    Method[] methods = null;
    if (!functions.isEmpty()) {
      if (fnMapper == null) {
        throw new ELException(LocalMessages.get("error.function.nomapper"));
      }
      methods = new Method[functions.size()];
      for (FunctionNode node: functions) {
        String image = node.getName();
        Method method = null;
        int colon = image.indexOf(':');
        if (colon < 0) {
          method = fnMapper.resolveFunction("", image);
        } else {
          method = fnMapper.resolveFunction(image.substring(0, colon), image.substring(colon + 1));
        }
        if (method == null) {
          throw new ELException(LocalMessages.get("error.function.notfound", image));
        }
        if (node.isVarArgs() && method.isVarArgs()) {
          if (method.getParameterTypes().length > node.getParamCount() + 1) {
            throw new ELException(LocalMessages.get("error.function.params", image));
          }
        } else {
          if (method.getParameterTypes().length != node.getParamCount()) {
            throw new ELException(LocalMessages.get("error.function.params", image));
          }
        }
        methods[node.getIndex()] = method;
      }
    }
View Full Code Here


  public Object eval(Bindings bindings, ELContext context) {
    Method method = bindings.getFunction(index);
    try {
      return invoke(bindings, context, null, method);
    } catch (IllegalAccessException e) {
      throw new ELException(LocalMessages.get("error.function.access", name), e);
    } catch (InvocationTargetException e) {
      throw new ELException(LocalMessages.get("error.function.invocation", name), e.getCause());
    }
  }
View Full Code Here

    return result;
  }

  public void setValue(Bindings bindings, ELContext context, Object value) throws ELException {
    if (!lvalue) {
      throw new ELException(LocalMessages.get("error.value.set.rvalue", getStructuralId(bindings)));
    }
    Object base = prefix.eval(bindings, context);
    if (base == null) {
      throw new PropertyNotFoundException(LocalMessages.get("error.property.base.null", prefix));
    }
View Full Code Here

    String name = bindings.convert(property, String.class);
    Method method = findMethod(name, base.getClass(), returnType, paramTypes);
    try {
      return method.invoke(base, paramValues);
    } catch (IllegalAccessException e) {
      throw new ELException(LocalMessages.get("error.property.method.access", name, base.getClass()));
    } catch (IllegalArgumentException e) {
      throw new ELException(LocalMessages.get("error.property.method.invocation", name, base.getClass()), e);
    } catch (InvocationTargetException e) {
      throw new ELException(LocalMessages.get("error.property.method.invocation", name, base.getClass()), e.getCause());
    }
  }
View Full Code Here

TOP

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

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.