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

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


      if (className != null) {
        ClassLoader loader;
        try {
          loader = Thread.currentThread().getContextClassLoader();
        } catch (Exception e) {
          throw new ELException("Could not get context class loader", e);
        }
        try {
          return loader == null ? Class.forName(className) : loader.loadClass(className);
        } catch (ClassNotFoundException e) {
          throw new ELException("Class " + className + " not found", e);
        } catch (Exception e) {
          throw new ELException("Class " + className + " could not be instantiated", e);
        }
      }
    }
    return null;
  }
View Full Code Here


      return ((Comparable)o1).compareTo(o2) < 0;
    }
    if (o2 instanceof Comparable) {
      return ((Comparable)o2).compareTo(o1) > 0;
    }
    throw new ELException(LocalMessages.get("error.compare.types", o1.getClass(), o2.getClass()));
  }
View Full Code Here

      return ((Comparable)o1).compareTo(o2) > 0;
    }
    if (o2 instanceof Comparable) {
      return ((Comparable)o2).compareTo(o1) < 0;
    }
    throw new ELException(LocalMessages.get("error.compare.types", o1.getClass(), o2.getClass()));
  }
View Full Code Here

      clazz = (Class< ? >) obj;
    } else if (obj instanceof String) {
      try {
        clazz = ReflectUtil.loadClass((String) obj);
      } catch (ProcessEngineException 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

    this.node = tree.getRoot();
    this.deferred = tree.isDeferred();

    if (node.isLiteralText()) {
      if (returnType == void.class) {
        throw new ELException(LocalMessages.get("error.method.literal.void", expr));
      }
    } else if (!node.isMethodInvocation()) {
      if (!node.isLeftValue()) {
        throw new ELException(LocalMessages.get("error.method.invalid", expr));
      }
      if (paramTypes == null) {
        throw new ELException(LocalMessages.get("error.method.notypes"));
      }
    }
  }
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

  public boolean isReadOnly(Bindings bindings, ELContext context) {
    return true;
  }

  public void setValue(Bindings bindings, ELContext context, Object value) {
    throw new ELException(LocalMessages.get("error.value.set.rvalue", getStructuralId(bindings)));
  }
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

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.