Package org.springframework.aop

Examples of org.springframework.aop.MethodMatcher.matches()


      Class clazz = (Class) it.next();
      Method[] methods = clazz.getMethods();
      for (int j = 0; j < methods.length; j++) {
        if ((introductionAwareMethodMatcher != null &&
            introductionAwareMethodMatcher.matches(methods[j], targetClass, hasIntroductions)) ||
            methodMatcher.matches(methods[j], targetClass)) {
          return true;
        }
      }
    }
View Full Code Here


      return true;
    }
    if (pointcut.getClassFilter().matches(targetClass)) {
      // Only check if it gets past first hurdle.
      MethodMatcher mm = pointcut.getMethodMatcher();
      if (mm.matches(method, targetClass)) {
        // We may need additional runtime (argument) check.
        return (!mm.isRuntime() || mm.matches(method, targetClass, args));
      }
    }
    return false;
View Full Code Here

    if (pointcut.getClassFilter().matches(targetClass)) {
      // Only check if it gets past first hurdle.
      MethodMatcher mm = pointcut.getMethodMatcher();
      if (mm.matches(method, targetClass)) {
        // We may need additional runtime (argument) check.
        return (!mm.isRuntime() || mm.matches(method, targetClass, args));
      }
    }
    return false;
  }
View Full Code Here

      Class clazz = (Class) it.next();
      Method[] methods = clazz.getMethods();
      for (int j = 0; j < methods.length; j++) {
        if ((introductionAwareMethodMatcher != null &&
            introductionAwareMethodMatcher.matches(methods[j], targetClass, hasIntroductions)) ||
            methodMatcher.matches(methods[j], targetClass)) {
          return true;
        }
      }
    }
View Full Code Here

    for (Class<?> clazz : classes) {
      Method[] methods = clazz.getMethods();
      for (Method method : methods) {
        if ((introductionAwareMethodMatcher != null &&
            introductionAwareMethodMatcher.matches(method, targetClass, hasIntroductions)) ||
            methodMatcher.matches(method, targetClass)) {
          return true;
        }
      }
    }
View Full Code Here

    for (Class<?> clazz : classes) {
      Method[] methods = clazz.getMethods();
      for (Method method : methods) {
        if ((introductionAwareMethodMatcher != null &&
            introductionAwareMethodMatcher.matches(method, targetClass, hasIntroductions)) ||
            methodMatcher.matches(method, targetClass)) {
          return true;
        }
      }
    }
View Full Code Here

      Class clazz = (Class) it.next();
      Method[] methods = clazz.getMethods();
      for (int j = 0; j < methods.length; j++) {
        if ((introductionAwareMethodMatcher != null &&
            introductionAwareMethodMatcher.matches(methods[j], targetClass, hasIntroductions)) ||
            methodMatcher.matches(methods[j], targetClass)) {
          return true;
        }
      }
    }
View Full Code Here

      Class clazz = (Class) it.next();
      Method[] methods = clazz.getMethods();
      for (int j = 0; j < methods.length; j++) {
        if ((introductionAwareMethodMatcher != null &&
            introductionAwareMethodMatcher.matches(methods[j], targetClass, hasIntroductions)) ||
            methodMatcher.matches(methods[j], targetClass)) {
          return true;
        }
      }
    }
View Full Code Here

    // not currently testable in a reliable fashion
    //assertDoesNotMatchStringClass(classFilter);

    assertFalse("Should not be a runtime match", methodMatcher.isRuntime());
    assertMatchesGetAge(methodMatcher);
    assertFalse("Expression should match setAge() method", methodMatcher.matches(setAge, TestBean.class));
  }


  public void setUp() throws NoSuchMethodException {
    getAge = TestBean.class.getMethod("getAge", null);
View Full Code Here

    // not currently testable in a reliable fashion
    //assertDoesNotMatchStringClass(classFilter);

    assertFalse("Should not be a runtime match", methodMatcher.isRuntime());
    assertMatchesGetAge(methodMatcher);
    assertTrue("Expression should match setAge(int) method", methodMatcher.matches(setAge, TestBean.class));
  }

 
  public void testThis() throws SecurityException, NoSuchMethodException{
    testThisOrTarget("this");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.