Java 类javax.el.ELManager 实例源码

项目:protobuf-el    文件:ProtoELProcessorEx.java   
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);
}
项目:fauxjsp    文件:ELFactoryServlet3Impl.java   
@Override
public ExpressionFactory newExpressionFactory() {
    return ELManager.getExpressionFactory();
}
项目:protobuf-el    文件:ELProcessorEx.java   
public ELProcessorEx() {
  super();
  getELManager().setELContext(new ELContextEx(ELManager.getExpressionFactory()));
}
项目:protobuf-el    文件:ProtoMessageQueryProcessor.java   
private ValueExpression getValueExpression(final ELContext context, final String expression,
    final Class<?> expectedType) {
  return ELManager.getExpressionFactory().createValueExpression(context, bracket(expression),
      expectedType);
}
项目:asw-web2-examples    文件:ElExampleResource.java   
@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();
}