DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=22193>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=22193 Unable to reference statics ------- Additional Comments From [EMAIL PROTECTED] 2004-09-22 17:10 ------- I have verified a possible solution modifying org.apache.commons.jexl.util.introspection.UberspectImpl public VelMethod getMethod(Object obj, String methodName, Object[] args, Info i) throws Exception { if (obj == null) return null; Method m = introspector.getMethod(obj.getClass(), methodName, args); if (m == null && obj instanceof Class) { m = introspector.getMethod((Class) obj, methodName, args); } return (m != null) ? new VelMethodImpl(m) : null; } In this way you can do this: JexlContext jc = JexlHelper.createContext(); jc.getVars().put("System", System.class); Expression e; e = ExpressionFactory.createExpression("System.currentTimeMillis()"); Object o = e.evaluate(jc); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
