Package org.springframework.aop.support

Examples of org.springframework.aop.support.DynamicMethodMatcherPointcut


      }
    };

    public StringSetterNullReplacementAdvice() {
      super(cleaner);
      setPointcut(new DynamicMethodMatcherPointcut() {
        public boolean matches(Method m, Class targetClass, Object[] args) {
          return args[0] == null;
        }
        public boolean matches(Method m, Class targetClass) {
          return m.getName().startsWith("set") &&
View Full Code Here


    public int count;

    public TestDynamicPointcutAdvice(MethodInterceptor mi, final String pattern) {
      super(mi);
      setPointcut(new DynamicMethodMatcherPointcut() {
        public boolean matches(Method m, Class targetClass, Object[] args) {
          boolean run = m.getName().indexOf(pattern) != -1;
          if (run) ++count;
          return run;
        }
View Full Code Here

    public int count;

    public TestDynamicPointcutForSettersOnly(MethodInterceptor mi, final String pattern) {
      super(mi);
      setPointcut(new DynamicMethodMatcherPointcut() {
        public boolean matches(Method m, Class targetClass, Object[] args) {
          boolean run = m.getName().indexOf(pattern) != -1;
          if (run) ++count;
          return run;
        }
View Full Code Here

        public Object invoke(MethodInvocation invocation) throws Throwable {
          methodNames.add(invocation.getMethod().getName());
          return invocation.proceed();
        }
      });
      setPointcut(new DynamicMethodMatcherPointcut() {
        public boolean matches(Method m, Class targetClass, Object[] args) {
          return m.getReturnType() == Void.TYPE;
        }
      });
    }
View Full Code Here

      }
    };

    public StringSetterNullReplacementAdvice() {
      super(cleaner);
      setPointcut(new DynamicMethodMatcherPointcut() {
        @Override
        public boolean matches(Method m, Class<?> targetClass, Object[] args) {
          return args[0] == null;
        }
        @Override
View Full Code Here

    public int count;

    public TestDynamicPointcutAdvice(MethodInterceptor mi, final String pattern) {
      super(mi);
      setPointcut(new DynamicMethodMatcherPointcut() {
        @Override
        public boolean matches(Method m, Class<?> targetClass, Object[] args) {
          boolean run = m.getName().indexOf(pattern) != -1;
          if (run) ++count;
          return run;
View Full Code Here

    public int count;

    public TestDynamicPointcutForSettersOnly(MethodInterceptor mi, final String pattern) {
      super(mi);
      setPointcut(new DynamicMethodMatcherPointcut() {
        @Override
        public boolean matches(Method m, Class<?> targetClass, Object[] args) {
          boolean run = m.getName().indexOf(pattern) != -1;
          if (run) ++count;
          return run;
View Full Code Here

        public Object invoke(MethodInvocation invocation) throws Throwable {
          methodNames.add(invocation.getMethod().getName());
          return invocation.proceed();
        }
      });
      setPointcut(new DynamicMethodMatcherPointcut() {
        @Override
        public boolean matches(Method m, Class<?> targetClass, Object[] args) {
          return m.getReturnType() == Void.TYPE;
        }
      });
View Full Code Here

TOP

Related Classes of org.springframework.aop.support.DynamicMethodMatcherPointcut

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.