Package org.activiti.engine.impl.javax.el

Examples of org.activiti.engine.impl.javax.el.ELException


  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

  public Object invoke(Bindings bindings, ELContext context, Class<?> returnType, Class<?>[] paramTypes, Object[] params) {
    Method method = getMethod(bindings, context, returnType, paramTypes);
    try {
      return method.invoke(null, params);
    } catch (IllegalAccessException e) {
      throw new ELException(LocalMessages.get("error.identifier.method.access", name));
    } catch (IllegalArgumentException e) {
      throw new ELException(LocalMessages.get("error.identifier.method.invocation", name, e));
    } catch (InvocationTargetException e) {
      throw new ELException(LocalMessages.get("error.identifier.method.invocation", name, e.getCause()));
    }
  }
View Full Code Here

      clazz = (Class< ? >) obj;
    } else if (obj instanceof String) {
      try {
        clazz = ReflectUtil.loadClass((String) obj);
      } catch (ActivitiException ae) {
        throw new ELException(ae);
      }
    } else {
      throw new ELException("Class or class name is missing");
    }
    Method[] methods = clazz.getMethods();
    for (Method m : methods) {
      int mod = m.getModifiers();
      if (Modifier.isStatic(mod) && Modifier.isPublic(mod)) {
View Full Code Here

      return Short.valueOf((short)-((Short)value).shortValue());
    }
    if (value instanceof Byte) {
      return Byte.valueOf((byte)-((Byte)value).byteValue());
    }
    throw new ELException(LocalMessages.get("error.negate", value.getClass()));
  }
View Full Code Here

      return (Boolean)value;
    }
    if (value instanceof String) {
      return Boolean.valueOf((String)value);
    }
    throw new ELException(LocalMessages.get("error.coerce.type", value.getClass(), Boolean.class));
  }
View Full Code Here

      return Character.valueOf((char)((Number)value).shortValue());
    }
    if (value instanceof String) {
      return Character.valueOf(((String)value).charAt(0));
    }
    throw new ELException(LocalMessages.get("error.coerce.type", value.getClass(), Character.class));
  }
View Full Code Here

    }
    if (value instanceof String) {
      try {
        return new BigDecimal((String)value);
      } catch (NumberFormatException e) {
        throw new ELException(LocalMessages.get("error.coerce.value", value, BigDecimal.class));
      }
    }
    if (value instanceof Character) {
      return new BigDecimal((short)((Character)value).charValue());
    }
    throw new ELException(LocalMessages.get("error.coerce.type", value.getClass(), BigDecimal.class));
  }
View Full Code Here

    }
    if (value instanceof String) {
      try {
        return new BigInteger((String)value);
      } catch (NumberFormatException e) {
        throw new ELException(LocalMessages.get("error.coerce.value", value, BigInteger.class));
      }
    }
    if (value instanceof Character) {
      return BigInteger.valueOf((short)((Character)value).charValue());
    }
    throw new ELException(LocalMessages.get("error.coerce.type", value.getClass(), BigInteger.class));
  }
View Full Code Here

TOP

Related Classes of org.activiti.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.