de.odysseus.el.TreeValueExpression Java Examples
The following examples show how to use
de.odysseus.el.TreeValueExpression.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JuelUtils.java From rheem with Apache License 2.0 | 6 votes |
public JuelFunction(String juelExpression, Class<T> resultClass, Map<String, Class<?>> arguments) { // Initialize the JUEL conext. this.expressionFactory = new de.odysseus.el.ExpressionFactoryImpl(); this.initializeContext(this.context = new SimpleContext()); // Index the arguments. Class<?>[] argumentTypeClasses = new Class[arguments.size()]; int argIndex = 0; for (Map.Entry<String, Class<?>> argumentEntry : arguments.entrySet()) { final String argName = argumentEntry.getKey(); final Class<?> argTypeClass = argumentEntry.getValue(); final TreeValueExpression argExpression = this.expressionFactory.createValueExpression(this.context, String.format("${%s}", argName), argTypeClass); Argument argument = new Argument(argIndex++, argTypeClass, argExpression); argumentTypeClasses[argument.index] = argument.typeClass; this.arguments.put(argName, argument); } // Create the JUEL method. this.expression = expressionFactory.createValueExpression(this.context, juelExpression, resultClass); // this.expression = expressionFactory.createMethodExpression(this.context, juelExpression, resultClass, argumentTypeClasses); }
Example #2
Source File: JuelElProvider.java From camunda-engine-dmn with Apache License 2.0 | 4 votes |
public ElExpression createExpression(String expression) { TreeValueExpression juelExpr = factory.createValueExpression(parsingElContext, expression, Object.class); return new JuelExpression(juelExpr, elContextFactory); }
Example #3
Source File: JuelElProvider.java From camunda-bpm-platform with Apache License 2.0 | 4 votes |
public ElExpression createExpression(String expression) { TreeValueExpression juelExpr = factory.createValueExpression(parsingElContext, expression, Object.class); return new JuelExpression(juelExpr, elContextFactory); }