Examples of Pointcut


Examples of org.jboss.aop.pointcut.Pointcut

      AdviceBinding binding = bindingCollection.removeBinding(name);
      if (binding == null)
      {
         return null;
      }
      Pointcut pointcut = binding.getPointcut();
      this.removePointcut(pointcut.getName());
      return binding;
   }
View Full Code Here

Examples of org.jboss.aop.pointcut.Pointcut

         removedBindings = this.bindingCollection.removeBindings(binds);
         for (AdviceBinding removedBinding: removedBindings)
         {
            ArrayList<Advisor> ads = removedBinding.getAdvisors();
            bindingAdvisors.addAll(ads);
            Pointcut pointcut = removedBinding.getPointcut();
            this.removePointcut(pointcut.getName());
         }
      }
      finally
      {
         lock.unlockWrite();
View Full Code Here

Examples of org.jboss.aop.pointcut.Pointcut

      AdviceBinding binding = bindingCollection.removeBinding(name);
      if (binding == null)
      {
         return null;
      }
      Pointcut pointcut = binding.getPointcut();
      this.removePointcut(pointcut.getName());
      return binding;
   }
View Full Code Here

Examples of org.jboss.aop.pointcut.Pointcut

    * Find a pointcut of with a given name
    */
   @Override
   public Pointcut getPointcut(String name)
   {
      Pointcut pointcut = null;

      if (parentFirst)
      {
         pointcut = parent.getPointcut(name);
         if (pointcut != null) return pointcut;
View Full Code Here

Examples of org.springframework.aop.Pointcut

  }

  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);
      }
View Full Code Here

Examples of org.springframework.aop.Pointcut

       
        BeanOne proxyOne;
        BeanTwo proxyTwo;
       
        // create pointcut, advice and advisor
        Pointcut pc = new SimpleStaticPointcut();
        Advice advice = new SimpleAdvice();
        Advisor advisor = new DefaultPointcutAdvisor(pc, advice);
       
        // create BeanOne proxy
        ProxyFactory pf = new ProxyFactory();
View Full Code Here

Examples of org.springframework.aop.Pointcut

    public void run() {
        TestBean target = new TestBean();

        // create advisor
        Pointcut pc = new ControlFlowPointcut(ControlFlowExample.class, "test");
        Advisor advisor = new DefaultPointcutAdvisor(pc,
                new SimpleBeforeAdvice());

        // create proxy
        ProxyFactory pf = new ProxyFactory();
View Full Code Here

Examples of org.springframework.aop.Pointcut

   * Build a 'safe' pointcut that excludes the AspectJ advice method itself.
   * @return a composable pointcut that builds on the original AspectJ expression pointcut
   * @see #getPointcut()
   */
  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

Examples of org.springframework.aop.Pointcut

    this.declarationOrder = declarationOrderInAspect;
    this.aspectName = aspectName;
   
    if (aif.getAspectMetadata().isLazilyInstantiated()) {
      // Static part of the pointcut is a lazy type.
      Pointcut preInstantiationPointcut =
          Pointcuts.union(aif.getAspectMetadata().getPerClausePointcut(), this.declaredPointcut);
     
      // Make it dynamic: must mutate from pre-instantiation to post-instantiation state.
      // If it's not a dynamic pointcut, it may be optimized out
      // by the Spring AOP infrastructure after the first evaluation.
View Full Code Here

Examples of org.springframework.aop.Pointcut

    return LOWEST_PRECEDENCE;
  }


  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
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.