Examples of IntroductionAdvisor


Examples of org.springframework.aop.IntroductionAdvisor

    DelegatingIntroductionInterceptor ii = new TestII();
   
    TestBean target = new TestBean();
   
    ProxyFactory pf = new ProxyFactory(target);
    IntroductionAdvisor ia = new DefaultIntroductionAdvisor(ii);
    assertTrue(ia.isPerInstance());
    pf.addAdvisor(0, ia);
   
    //assertTrue(Arrays.binarySearch(pf.getProxiedInterfaces(), TimeStamped.class) != -1);
    TimeStamped ts = (TimeStamped) pf.getProxy();
   
View Full Code Here

Examples of org.springframework.aop.IntroductionAdvisor

          "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

Examples of org.springframework.aop.IntroductionAdvisor

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

Examples of org.springframework.aop.IntroductionAdvisor

   */
  private static boolean hasMatchingIntroductions(Advised config, Class<?> actualClass) {
    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(actualClass)) {
          return true;
        }
      }
    }
    return false;
View Full Code Here

Examples of org.springframework.aop.IntroductionAdvisor

    DelegatingIntroductionInterceptor ii = new TestII();

    TestBean target = new TestBean();

    ProxyFactory pf = new ProxyFactory(target);
    IntroductionAdvisor ia = new DefaultIntroductionAdvisor(ii);
    assertTrue(ia.isPerInstance());
    pf.addAdvisor(0, ia);

    //assertTrue(Arrays.binarySearch(pf.getProxiedInterfaces(), TimeStamped.class) != -1);
    TimeStamped ts = (TimeStamped) pf.getProxy();
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.