Package org.springframework.aop.support

Examples of org.springframework.aop.support.ComposablePointcut


   */
  public final Pointcut buildSafePointcut() {
    Pointcut pc = getPointcut();
    MethodMatcher safeMethodMatcher = MethodMatchers.intersection(
        new AdviceExcludingMethodMatcher(this.aspectJAdviceMethod), pc.getMethodMatcher());
    return new ComposablePointcut(pc.getClassFilter(), safeMethodMatcher);
  }
View Full Code Here


        ajexp.setExpression(findPerClause(aspectClass));
        this.perClausePointcut = ajexp;
        return;
      case PERTYPEWITHIN :
        // Works with a type pattern
        this.perClausePointcut = new ComposablePointcut(new TypePatternClassFilter(findPerClause(aspectClass)));
        return;
      default :
        throw new AopConfigException(
            "PerClause " + ajType.getPerClause().getKind() + " not supported by Spring AOP for " + aspectClass);
    }
View Full Code Here

   * Calculate a pointcut for the given target class, if any.
   * @param targetClass the class to introspect
   * @return the applicable Pointcut object, or <code>null</code> if none
   */
  protected Pointcut buildPointcut(Set<Class<? extends Annotation>> asyncAnnotationTypes) {
    ComposablePointcut result = null;
    for (Class<? extends Annotation> asyncAnnotationType : asyncAnnotationTypes) {
      Pointcut cpc = new AnnotationMatchingPointcut(asyncAnnotationType, true);
      Pointcut mpc = new AnnotationMatchingPointcut(null, asyncAnnotationType);
      if (result == null) {
        result = new ComposablePointcut(cpc).union(mpc);
      }
      else {
        result.union(cpc).union(mpc);
      }
    }
    return result;
  }
View Full Code Here

   */
  public final Pointcut buildSafePointcut() {
    Pointcut pc = getPointcut();
    MethodMatcher safeMethodMatcher = MethodMatchers.intersection(
        new AdviceExcludingMethodMatcher(this.aspectJAdviceMethod), pc.getMethodMatcher());
    return new ComposablePointcut(pc.getClassFilter(), safeMethodMatcher);
  }
View Full Code Here

  protected Pointcut buildPointcut() {
    Pointcut cpc = new AnnotationMatchingPointcut(Stat.class, true);
    Pointcut mpc = AnnotationMatchingPointcut.forMethodAnnotation(Stat.class);
   
    ComposablePointcut result = new ComposablePointcut(cpc).union(mpc);
   
    return result;
  }
View Full Code Here

  public boolean isPerInstance() {
    return true;
  }

  private Pointcut buildPointcut() {
    ComposablePointcut result = null;
    for (Class<? extends Annotation> publisherAnnotationType : this.annotations) {
      Pointcut mpc = new MetaAnnotationMatchingPointcut(null, publisherAnnotationType);
      if (result == null) {
        result = new ComposablePointcut(mpc);
      } else {
        result.union(mpc);
      }
    }
    return result;
  }
View Full Code Here

TOP

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

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.