Java Unified Expression Language

An implementation of the unified expression language.
Download

Java Unified Expression Language Ranking & Summary

Advertisement

  • Rating:
  • License:
  • The Apache License 2.0
  • Price:
  • FREE
  • Publisher Name:
  • Christoph Beck
  • Publisher web site:

Java Unified Expression Language Tags


Java Unified Expression Language Description

An implementation of the unified expression language. Java Unified Expression Language is an implementation of the unified expression language (EL) as specified by the JSP 2.1 standard (JSR-245).The javax.el.ExpressionFactory implementation is de.odysseus.el.ExpressionFactoryImpl: // create an expression factoryjavax.el.ExpressionFactory factory = new de.odysseus.el.ExpressionFactoryImpl();Package de.odysseus.el.util provides ready-to-use subclasses of javax.el.ELContext and javax.el.ELResolver: // create a simple EL contextde.odysseus.el.util.SimpleContext context = new de.odysseus.el.util.SimpleContext(new de.odysseus.el.util.SimpleResolver());// define function math:max(int,int)context.setFunction("math", "max", Math.class.getMethod("max", new Class[]{int.class, int.class}));// define variable "foo"context.setVariable("foo", factory.createValueExpression(0, null));// create expressionjavax.el.ValueExpression e = factory.createValueExpression(context, "${math:max(foo,bar)}", null);// set value for top-level property "bar"context.setValue(null, "bar", 1);// evaluate expression...System.out.println(e.getValue(context)); // --> 1The JUEL jar may be run from the command line to dump the parse tree of an EL expression: $ java -jar juel-2.1.x.jar "#{unified(expression)}"+- #{...} | +- unified(...) | +- | +- expression | +- language What's New in This Release: · This version implements changes for JEE 6 (refer to JSR 245, maintenance release 2), including an API for method invocations. · The new API replaces JUEL's proprietary API for method invocations used in past 2.1.x releases. · The BeanELResolver class now provides a generic default for method invocations using reflection. · Method invocations are disabled and enabled via the javax.el.methodInvocations property.


Java Unified Expression Language Related Software