Package org.springframework.aop.support

Examples of org.springframework.aop.support.StaticMethodMatcherPointcut


    ++afterTakesInt;
  }
 
  public static Advisor advisor() {
    return new DefaultPointcutAdvisor(
      new StaticMethodMatcherPointcut() {
        public boolean matches(Method method, Class targetClass) {
          return method.getParameterTypes().length == 1 &&
            method.getParameterTypes()[0].equals(Integer.class);
        }
      },
View Full Code Here


    ++beforeStringReturn;
  }
 
  public static Advisor advisor() {
    return new DefaultPointcutAdvisor(
      new StaticMethodMatcherPointcut() {
        public boolean matches(Method method, Class targetClass) {
          return method.getReturnType().equals(String.class);
        }
      },
      new TraceBeforeAdvice());
View Full Code Here

    private final ServiceMetadata smd;

    public OneWayAdvisor(final ServiceMetadata aSmd, TaskExecutor taskExecutor) {
        this.smd = aSmd;
        setPointcut(new StaticMethodMatcherPointcut() {
            public boolean matches(Method method, Class targetClass) {
                for (Method m : smd.getOneWayMethods()) {
                    if (m.getName().equals(method.getName())) {
                        return true;
                    }
View Full Code Here

@SuppressWarnings("serial")
public class ControllerAdvisor extends DefaultPointcutAdvisor {

  public ControllerAdvisor() {
    super(new StaticMethodMatcherPointcut() {
      public boolean matches(Method method, Class<?> targetClass) {
        return (AnnotationUtils.findAnnotation(targetClass, Controller.class) != null);
      }
    }, new SimpleTraceInterceptor());
  }
View Full Code Here

    ++afterTakesInt;
  }

  public static Advisor advisor() {
    return new DefaultPointcutAdvisor(
      new StaticMethodMatcherPointcut() {
        @Override
        public boolean matches(Method method, Class<?> targetClass) {
          return method.getParameterTypes().length == 1 &&
            method.getParameterTypes()[0].equals(Integer.class);
        }
View Full Code Here

    ++beforeStringReturn;
  }

  public static Advisor advisor() {
    return new DefaultPointcutAdvisor(
      new StaticMethodMatcherPointcut() {
        @Override
        public boolean matches(Method method, Class<?> targetClass) {
          return method.getReturnType().equals(String.class);
        }
      },
View Full Code Here

    public ControllerAdvisor() {
      super(getControllerPointcut(), new SimpleTraceInterceptor());
    }

    private static StaticMethodMatcherPointcut getControllerPointcut() {
      return new StaticMethodMatcherPointcut() {
        @Override
        public boolean matches(Method method, Class<?> targetClass) {
          return ((AnnotationUtils.findAnnotation(targetClass, Controller.class) != null) ||
              (AnnotationUtils.findAnnotation(targetClass, RequestMapping.class) != null));
        }
View Full Code Here

TOP

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

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.