Package org.jboss.aop.advice

Examples of org.jboss.aop.advice.AdviceBinding


         int bindSize = binds.size();

         for (int i = 0; i < bindSize; i++)
         {

            AdviceBinding binding = (AdviceBinding) bindings.get(binds.get(i));
            if (binding == null)
            {
               logger.debug("AspectManager.removeBindings() no binding found with name " + binds.get(i));
               continue;
            }
            ArrayList ads = binding.getAdvisors();
            bindingAdvisors.addAll(ads);
            bindings.remove(binding.getName());
            Pointcut pointcut = binding.getPointcut();
            this.removePointcut(pointcut.getName());
            removedBindings.add(binding);
         }
      }
      Iterator it = bindingAdvisors.iterator();
View Full Code Here


   /**
    * Add an interceptor pointcut with a given name
    */
   public synchronized void addBinding(AdviceBinding binding)
   {
      AdviceBinding removedBinding = internalRemoveBinding(binding.getName());
      Set affectedAdvisors = removedBinding == null? new HashSet(): new HashSet(removedBinding.getAdvisors());
      initBindingsMap();
      synchronized (bindings)
      {
         bindings.put(binding.getName(), binding);
      }
View Full Code Here

    */
   private AdviceBinding internalRemoveBinding(String name)
   {
      synchronized (bindings)
      {
         AdviceBinding binding = (AdviceBinding) bindings.remove(name);
         if (binding == null)
         {
            return null;
         }
         Pointcut pointcut = binding.getPointcut();
         this.removePointcut(pointcut.getName());
         return binding;
      }
   }
View Full Code Here

   public synchronized void removeAdviceBindings(ArrayList bindings)
   {
      for (int i = 0; i < bindings.size(); i++)
      {
         AdviceBinding binding = (AdviceBinding) bindings.get(i);
         removeCallerPointcut(binding);
      }
      adviceBindings.removeAll(bindings);
      rebuildInterceptors();
      doesHaveAspects = adviceBindings.size() > 0;
View Full Code Here

      synchronized (manager.getBindings())
      {
         Iterator it = manager.getBindings().values().iterator();
         while (it.hasNext())
         {
            AdviceBinding binding = (AdviceBinding) it.next();
            if (AspectManager.verbose && logger.isDebugEnabled()) logger.debug("iterate binding " + binding.getName() + " " + binding.getPointcut().getExpr());
            resolveMethodPointcut(newMethodInfos, binding);
            resolveFieldPointcut(newFieldReadInfos, binding, false);
            resolveFieldPointcut(newFieldWriteInfos, binding, true);
            resolveConstructorPointcut(newConstructorInfos, binding);
            resolveConstructionPointcut(newConstructionInfos, binding);
View Full Code Here

      ConByConInfo info = getConCalledByCon(callingIndex, cname, calledHash);
      info.clear();
      Iterator it = bindings.iterator();
      while (it.hasNext())
      {
         AdviceBinding binding = (AdviceBinding) it.next();
         pointcutResolved(info, binding, new ConstructorCalledByConstructorJoinpoint(info.getCallingConstructor(), info.getConstructor()));
      }
      finalizeConCalledByConInterceptorChain(info);
   }
View Full Code Here

      MethodByConInfo info = getConstructorCallerMethodInfo(callingIndex, cname, calledHash);
      info.clear();
      Iterator it = bindings.iterator();
      while (it.hasNext())
      {
         AdviceBinding binding = (AdviceBinding) it.next();
         pointcutResolved(info, binding, new MethodCalledByConstructorJoinpoint(info.getCallingConstructor(), info.getMethod()));
      }
      finalizeMethodCalledByConInterceptorChain(info);
   }
View Full Code Here

         synchronized (manager.getBindings())
         {
            Iterator it = manager.getBindings().values().iterator();
            while (it.hasNext())
            {
               AdviceBinding binding = (AdviceBinding) it.next();
               if (binding.getPointcut().matchesCall(this, callingConstructor, called, calledMethod))
               {
                  addConstructorCallerPointcut(callingIndex, calledClass, calledMethodHash, binding);
                  matched = true;
               }
            }
View Full Code Here

         synchronized (manager.getBindings())
         {
            Iterator it = manager.getBindings().values().iterator();
            while (it.hasNext())
            {
               AdviceBinding binding = (AdviceBinding) it.next();
               if (binding.getPointcut().matchesCall(this, callingConstructor, called, calledCon))
               {
                  addConstructorCalledByConPointcut(callingIndex, calledClass, calledConHash, binding);
                  matched = true;
               }
            }
View Full Code Here

            Iterator it = manager.getBindings().values().iterator();
            boolean matched = false;
            while (it.hasNext())
            {
               AdviceBinding binding = (AdviceBinding) it.next();
               if (binding.getPointcut().matchesCall(ClassAdvisor.this, callingMethod, called, calledMethod))
               {
                  addMethodCalledByMethodPointcut(callingMethodHash, calledClass, calledMethodHash, binding);
                  matched = true;
               }
            }
View Full Code Here

TOP

Related Classes of org.jboss.aop.advice.AdviceBinding

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.