Examples of DefaultPointcutAdvisor


Examples of org.springframework.aop.support.DefaultPointcutAdvisor

      throw new UnknownAdviceTypeException(adviceObject);
    }
    Advice advice = (Advice) adviceObject;
    if (advice instanceof MethodInterceptor) {
      // So well-known it doesn't even need an adapter.
      return new DefaultPointcutAdvisor(advice);
    }
    for (int i = 0; i < this.adapters.size(); i++) {
      // Check that it is supported.
      AdvisorAdapter adapter = (AdvisorAdapter) this.adapters.get(i);
      if (adapter.supportsAdvice(advice)) {
        return new DefaultPointcutAdvisor(advice);
      }
    }
    throw new UnknownAdviceTypeException(advice);
  }
View Full Code Here

Examples of org.springframework.aop.support.DefaultPointcutAdvisor

   * Create a new advisor that will expose the given bean name,
   * with no introduction
   * @param beanName bean name to expose
   */
  public static Advisor createAdvisorWithoutIntroduction(String beanName) {
    return new DefaultPointcutAdvisor(new ExposeBeanNameInterceptor(beanName));
  }
View Full Code Here

Examples of org.springframework.aop.support.DefaultPointcutAdvisor

   */
  @Override
  protected Object createMainInterceptor() {
    this.transactionInterceptor.afterPropertiesSet();
    if (this.pointcut != null) {
      return new DefaultPointcutAdvisor(this.pointcut, this.transactionInterceptor);
    }
    else {
      // Rely on default pointcut.
      return new TransactionAttributeSourceAdvisor(this.transactionInterceptor);
    }
View Full Code Here

Examples of org.springframework.aop.support.DefaultPointcutAdvisor

  public void afterPropertiesSet() {
    Pointcut pointcut = new AnnotationMatchingPointcut(this.validatedAnnotationType, true);
    Advice advice = (this.validator != null ? new MethodValidationInterceptor(this.validator) :
        new MethodValidationInterceptor());
    this.advisor = new DefaultPointcutAdvisor(pointcut, advice);
  }
View Full Code Here

Examples of org.springframework.aop.support.DefaultPointcutAdvisor

  public void afterPropertiesSet() {
    Pointcut pointcut = new AnnotationMatchingPointcut(this.validatedAnnotationType, true);
    Advice advice = (this.validator != null ? new MethodValidationInterceptor(this.validator) :
        new MethodValidationInterceptor());
    this.advisor = new DefaultPointcutAdvisor(pointcut, advice);
  }
View Full Code Here

Examples of org.springframework.aop.support.DefaultPointcutAdvisor

   * Create a new advisor that will expose the given bean name,
   * with no introduction
   * @param beanName bean name to expose
   */
  public static Advisor createAdvisorWithoutIntroduction(String beanName) {
    return new DefaultPointcutAdvisor(new ExposeBeanNameInterceptor(beanName));
  }
View Full Code Here

Examples of org.springframework.aop.support.DefaultPointcutAdvisor

  @Override
  protected Object createMainInterceptor() {
    this.cachingInterceptor.afterPropertiesSet();
    if (this.pointcut != null) {
      return new DefaultPointcutAdvisor(this.pointcut, this.cachingInterceptor);
    } else {
      // Rely on default pointcut.
      throw new UnsupportedOperationException();
    }
  }
View Full Code Here

Examples of org.springframework.aop.support.DefaultPointcutAdvisor

      throw new UnknownAdviceTypeException(adviceObject);
    }
    Advice advice = (Advice) adviceObject;
    if (advice instanceof MethodInterceptor) {
      // So well-known it doesn't even need an adapter.
      return new DefaultPointcutAdvisor(advice);
    }
    for (AdvisorAdapter adapter : this.adapters) {
      // Check that it is supported.
      if (adapter.supportsAdvice(advice)) {
        return new DefaultPointcutAdvisor(advice);
      }
    }
    throw new UnknownAdviceTypeException(advice);
  }
View Full Code Here

Examples of org.springframework.aop.support.DefaultPointcutAdvisor

    else if (advice instanceof DynamicIntroductionAdvice) {
      // We need an IntroductionAdvisor for this kind of introduction.
      throw new AopConfigException("DynamicIntroductionAdvice may only be added as part of IntroductionAdvisor");
    }
    else {
      addAdvisor(pos, new DefaultPointcutAdvisor(advice));
    }
  }
View Full Code Here

Examples of org.springframework.aop.support.DefaultPointcutAdvisor

  @Override
  protected Object createMainInterceptor() {
    this.cachingInterceptor.afterPropertiesSet();
    if (this.pointcut != null) {
      return new DefaultPointcutAdvisor(this.pointcut, this.cachingInterceptor);
    } else {
      // Rely on default pointcut.
      throw new UnsupportedOperationException();
    }
  }
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.