Package org.springframework.aop

Examples of org.springframework.aop.IntroductionAdvisor


        // create the target
        TargetBean target = new TargetBean();
        target.setName("Rob Harrop");

        // create the advisor
        IntroductionAdvisor advisor = new IsModifiedAdvisor();

        // create the proxy
        ProxyFactory pf = new ProxyFactory();
        pf.setTarget(target);
        pf.addAdvisor(advisor);
View Full Code Here


          "This configuration only has " + this.advisors.size() + " advisors.");
    }

    Advisor advisor = (Advisor) this.advisors.get(index);
    if (advisor instanceof IntroductionAdvisor) {
      IntroductionAdvisor ia = (IntroductionAdvisor) advisor;
      // We need to remove introduction interfaces.
      for (int j = 0; j < ia.getInterfaces().length; j++) {
        removeInterface(ia.getInterfaces()[j]);
      }
    }

    this.advisors.remove(index);
    updateAdvisorArray();
View Full Code Here

            }
          }
        }
      }
      else if (advisor instanceof IntroductionAdvisor) {
        IntroductionAdvisor ia = (IntroductionAdvisor) advisor;
        if (config.isPreFiltered() || ia.getClassFilter().matches(targetClass)) {
          Interceptor[] interceptors = registry.getInterceptors(advisor);
          interceptorList.addAll(Arrays.asList(interceptors));
        }
      }
      else {
View Full Code Here

   */
  private static boolean hasMatchingIntroductions(Advised config, Class targetClass) {
    for (int i = 0; i < config.getAdvisors().length; i++) {
      Advisor advisor = config.getAdvisors()[i];
      if (advisor instanceof IntroductionAdvisor) {
        IntroductionAdvisor ia = (IntroductionAdvisor) advisor;
        if (ia.getClassFilter().matches(targetClass)) {
          return true;
        }
      }
    }
    return false;
View Full Code Here

            }
          }
        }
      }
      else if (advisor instanceof IntroductionAdvisor) {
        IntroductionAdvisor ia = (IntroductionAdvisor) advisor;
        if (config.isPreFiltered() || ia.getClassFilter().matches(targetClass)) {
          Interceptor[] interceptors = registry.getInterceptors(advisor);
          interceptorList.addAll(Arrays.asList(interceptors));
        }
      }
      else {
View Full Code Here

   */
  private static boolean hasMatchingIntroductions(Advised config, Class targetClass) {
    for (int i = 0; i < config.getAdvisors().length; i++) {
      Advisor advisor = config.getAdvisors()[i];
      if (advisor instanceof IntroductionAdvisor) {
        IntroductionAdvisor ia = (IntroductionAdvisor) advisor;
        if (ia.getClassFilter().matches(targetClass)) {
          return true;
        }
      }
    }
    return false;
View Full Code Here

          "This configuration only has " + this.advisors.size() + " advisors.");
    }

    Advisor advisor = this.advisors.get(index);
    if (advisor instanceof IntroductionAdvisor) {
      IntroductionAdvisor ia = (IntroductionAdvisor) advisor;
      // We need to remove introduction interfaces.
      for (int j = 0; j < ia.getInterfaces().length; j++) {
        removeInterface(ia.getInterfaces()[j]);
      }
    }

    this.advisors.remove(index);
    updateAdvisorArray();
View Full Code Here

          "This configuration only has " + this.advisors.size() + " advisors.");
    }

    Advisor advisor = (Advisor) this.advisors.get(index);
    if (advisor instanceof IntroductionAdvisor) {
      IntroductionAdvisor ia = (IntroductionAdvisor) advisor;
      // We need to remove introduction interfaces.
      for (int j = 0; j < ia.getInterfaces().length; j++) {
        removeInterface(ia.getInterfaces()[j]);
      }
    }

    this.advisors.remove(index);
    updateAdvisorArray();
View Full Code Here

            }
          }
        }
      }
      else if (advisor instanceof IntroductionAdvisor) {
        IntroductionAdvisor ia = (IntroductionAdvisor) advisor;
        if (ia.getClassFilter().matches(targetClass)) {
          Interceptor[] interceptors = registry.getInterceptors(advisor);
          interceptorList.addAll(Arrays.asList(interceptors));
        }
      }
    }
View Full Code Here

   */
  private static boolean hasMatchingIntroductions(Advised config, Class targetClass) {
    for (int i = 0; i < config.getAdvisors().length; i++) {
      Advisor advisor = config.getAdvisors()[i];
      if (advisor instanceof IntroductionAdvisor) {
        IntroductionAdvisor ia = (IntroductionAdvisor) advisor;
        if (ia.getClassFilter().matches(targetClass)) {
          return true;
        }
      }
    }
    return false;
View Full Code Here

TOP

Related Classes of org.springframework.aop.IntroductionAdvisor

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.