Package org.springframework.aop

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


    MethodMatcher getterMatcher = new StartsWithMatcher("get");
    MethodMatcher setterMatcher = new StartsWithMatcher("set");
    MethodMatcher union = MethodMatchers.union(getterMatcher, setterMatcher);
   
    assertFalse("Union is a static matcher", union.isRuntime());
    assertTrue("Matched setAge method", union.matches(ITESTBEAN_SETAGE, TestBean.class));
    assertTrue("Matched getAge method", union.matches(ITESTBEAN_GETAGE, TestBean.class));
    assertFalse("Didn't matched absquatulate method", union.matches(IOTHER_ABSQUATULATE, TestBean.class));

  }
View Full Code Here


    MethodMatcher setterMatcher = new StartsWithMatcher("set");
    MethodMatcher union = MethodMatchers.union(getterMatcher, setterMatcher);
   
    assertFalse("Union is a static matcher", union.isRuntime());
    assertTrue("Matched setAge method", union.matches(ITESTBEAN_SETAGE, TestBean.class));
    assertTrue("Matched getAge method", union.matches(ITESTBEAN_GETAGE, TestBean.class));
    assertFalse("Didn't matched absquatulate method", union.matches(IOTHER_ABSQUATULATE, TestBean.class));

  }

View Full Code Here

    MethodMatcher union = MethodMatchers.union(getterMatcher, setterMatcher);
   
    assertFalse("Union is a static matcher", union.isRuntime());
    assertTrue("Matched setAge method", union.matches(ITESTBEAN_SETAGE, TestBean.class));
    assertTrue("Matched getAge method", union.matches(ITESTBEAN_GETAGE, TestBean.class));
    assertFalse("Didn't matched absquatulate method", union.matches(IOTHER_ABSQUATULATE, TestBean.class));

  }


  public static class StartsWithMatcher extends StaticMethodMatcher {
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.