public ProtoELProcessorEx() { super(); final ELContextEx context = new ELContextEx(ELManager.getExpressionFactory()); context.addELResolver(new ProtoBeanUtils.FieldDescriptorConverter()); context.addELResolver(new MessageELResolver(false)); context.addELResolver(new BuilderELResolver(false, false)); context.addELResolver(new RepeatedFieldBuilderELResolver()); getELManager().setELContext(context); }
@Override public ExpressionFactory newExpressionFactory() { return ELManager.getExpressionFactory(); }
public ELProcessorEx() { super(); getELManager().setELContext(new ELContextEx(ELManager.getExpressionFactory())); }
private ValueExpression getValueExpression(final ELContext context, final String expression, final Class<?> expectedType) { return ELManager.getExpressionFactory().createValueExpression(context, bracket(expression), expectedType); }
@GET public String evaluatePath() { Person person = new Person("Luke", new Address("Tatooine Way", "133", "232423")); ELProcessor processor = new ELProcessor(); ELContext context = processor.getELManager().getELContext(); context.getVariableMapper().setVariable("person", ELManager.getExpressionFactory().createValueExpression(person, Person.class)); Object address = processor.getValue("person.address.street", String.class); return address.toString(); }