Package org.springframework.expression

Examples of org.springframework.expression.MethodResolver


    assertTrue(result.getClass().isArray());
    assertEquals(ABC.A, Array.get(result, 0));
    assertEquals(ABC.B, Array.get(result, 1));
    assertEquals(ABC.C, Array.get(result, 2));

    context.addMethodResolver(new MethodResolver() {
      @Override
      public MethodExecutor resolve(EvaluationContext context, Object targetObject, String name,
          List<TypeDescriptor> argumentTypes) throws AccessException {
        return new MethodExecutor() {
          @Override
View Full Code Here


    // reflective method accessor is the only one by default
    List<MethodResolver> methodResolvers = ctx.getMethodResolvers();
    assertEquals(1, methodResolvers.size());

    MethodResolver dummy = new DummyMethodResolver();
    ctx.addMethodResolver(dummy);
    assertEquals(2, ctx.getMethodResolvers().size());

    List<MethodResolver> copy = new ArrayList<MethodResolver>();
    copy.addAll(ctx.getMethodResolvers());
View Full Code Here

   * @param replaceMethodResolver replace context method resolver
   */
  public MessageExpressionMethods(StandardEvaluationContext evaluationContext, boolean autoCustomize, boolean replaceMethodResolver) {
    Assert.notNull(evaluationContext, "Evaluation context cannot be null");
    if (autoCustomize) {
      MethodResolver methodResolver = new MessagePartitionKeyMethodResolver();
      if (replaceMethodResolver) {
        List<MethodResolver> methodResolvers = new ArrayList<MethodResolver>();
        methodResolvers.add(methodResolver);
        evaluationContext.setMethodResolvers(methodResolvers);
      } else {
View Full Code Here

TOP

Related Classes of org.springframework.expression.MethodResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.