Package org.jboss.aop.advice

Examples of org.jboss.aop.advice.ClassifiedBindingCollection


      }
   }
  
   protected void updateFieldPointcutAfterRemove(FieldInfo[] fieldInfos, AdviceBinding binding, boolean write)
   {
      ClassifiedBindingCollection bindingCol = manager.getBindingCollection();
      Collection<AdviceBinding> bindings = write? bindingCol.getFieldWriteBindings():
            bindingCol.getFieldReadBindings();
      for (int i = 0; i < fieldInfos.length; i++)
      {
         Field field = fieldInfos[i].getField();
         fieldInfos[i].resetInterceptors();
View Full Code Here


   {
   }
  
   protected void updateConstructorPointcutAfterRemove(AdviceBinding binding)
   {
      ClassifiedBindingCollection bindingCol = manager.getBindingCollection();
      if(constructorInfos != null && constructorInfos.length > 0)
      {
         for (int i = 0; i < constructors.length; i++)
         {
            constructorInfos[i].resetInterceptors();
            Constructor<?> constructor = constructors[i];
            if (binding.getPointcut().matchesExecution(this, constructor))
            {
               if (AspectManager.verbose) System.err.println("[debug] Removing constructor, matched binding: " + constructor);
               constructorInfos[i].clear();
               for(AdviceBinding ab : bindingCol.getConstructorExecutionBindings())
               {
                  if (ab.getPointcut().matchesExecution(this, constructor))
                  {
                     pointcutResolved(constructorInfos[i], ab, new ConstructorJoinpoint(constructor));
                  }
View Full Code Here

      }
   }
  
   protected void updateConstructionPointcutAfterRemove(AdviceBinding binding)
   {
      ClassifiedBindingCollection bindingCol = manager.getBindingCollection();
      if (constructionInfos.length > 0)
      {
         for (int i = 0; i < constructionInfos.length ;i++)
         {
            constructionInfos[i].resetInterceptors();
            ConstructionInfo info = constructionInfos[i];
            Constructor<?> constructor = info.getConstructor();
            if (binding.getPointcut().matchesConstruction(this, constructor))
            {
               if (AspectManager.verbose) System.err.println("[debug] Removing construction, matched binding: " + constructor);
               constructionInfos[i].clear();
               for(AdviceBinding ab : bindingCol.getConstructionBindings())
               {
                  if (binding.getPointcut().matchesConstruction(this, constructor))
                  {
                     pointcutResolved(constructionInfos[i], ab, new ConstructorJoinpoint(constructor));
                  }
View Full Code Here

   public HashSet<AspectDefinition> getAspects()
   {
      if (!initialisedAspects)
      {
         ClassifiedBindingCollection bindingCol = advisor.getManager().getBindingCollection();
         bindMethodAdvices(clazz, bindingCol);
         bindConstructorAdvices(bindingCol);
         bindFieldAdvices(bindingCol);
      }
      return aspects;
View Full Code Here

      makeInterceptorChains();
   }

   private void makeInterceptorChains()
   {
      ClassifiedBindingCollection bindingCol = manager.getBindingCollection();
      synchronized (bindingCol)
      {
         Collection<AdviceBinding> bindings = bindingCol.getConstructorExecutionBindings();
         for (AdviceBinding binding : bindings)
         {
            if (AspectManager.verbose && logger.isDebugEnabled()) logger.debug("iterate binding " + binding.getName());
            resolveConstructorPointcut(binding);
         }
         bindings = bindingCol.getMethodExecutionBindings();
         for (AdviceBinding binding : bindings)
         {
            if (AspectManager.verbose && logger.isDebugEnabled()) logger.debug("iterate binding " + binding.getName());
            resolveMethodPointcut(binding);
         }
View Full Code Here

   }

   @SuppressWarnings("deprecation")
   private void resolveBindings(AspectManager manager)
   {
      ClassifiedBindingCollection bindingCol = manager.bindingCollection;
      synchronized (bindingCol)
      {
         for (AdviceBinding binding: bindingCol.getFieldReadBindings())
         {
            if (AspectManager.verbose && logger.isDebugEnabled())
            {
               logger.debug("iterate binding " + binding.getName() + " " +
                     binding.getPointcut().getExpr());
            }
            resolveFieldPointcut(fieldReadInfos, fieldReadInterceptors, binding, false);
         }
         for (AdviceBinding binding: bindingCol.getFieldWriteBindings())
         {
            if (AspectManager.verbose && logger.isDebugEnabled())
            {
               logger.debug("iterate binding " + binding.getName() + " " +
                     binding.getPointcut().getExpr());
            }
            resolveFieldPointcut(fieldWriteInfos, fieldWriteInterceptors, binding, true);
         }
         for (AdviceBinding binding: bindingCol.getConstructionBindings())
         {
            if (AspectManager.verbose && logger.isDebugEnabled())
            {
               logger.debug("iterate binding " + binding.getName() + " " +
                     binding.getPointcut().getExpr());
            }
            resolveConstructionPointcut(binding);
         }
         for (AdviceBinding binding: bindingCol.getConstructorExecutionBindings())
         {
            if (AspectManager.verbose && logger.isDebugEnabled())
            {
               logger.debug("iterate binding " + binding.getName() + " " +
                     binding.getPointcut().getExpr());
            }
            resolveConstructorPointcut(binding);
         }
         for (AdviceBinding binding: bindingCol.getMethodExecutionBindings())
         {
            if (AspectManager.verbose && logger.isDebugEnabled())
            {
               logger.debug("iterate binding " + binding.getName() + " " +
                     binding.getPointcut().getExpr());
View Full Code Here

         Class<?> called = SecurityActions.getClassLoader(callingClass).loadClass(calledClass);
         Method calledMethod = MethodHashing.findMethodByHash(called, calledMethodHash);
         if (calledMethod == null) throw new RuntimeException("Unable to figure out calledmethod of a caller pointcut");

         boolean matched = false;
         ClassifiedBindingCollection bindingCol = manager.getBindingCollection();
         synchronized (bindingCol)
         {
            for (AdviceBinding binding : bindingCol.getConstructorCallBindings())
            {
               if (binding.getPointcut().matchesCall(this, callingConstructor, called, calledMethod))
               {
                  addConstructorCallerPointcut(callingIndex, calledClass, calledMethodHash, binding);
                  matched = true;
View Full Code Here

         Class<?> called = SecurityActions.getClassLoader(callingClass).loadClass(calledClass);
         Constructor<?> calledCon = MethodHashing.findConstructorByHash(called, calledConHash);
         if (calledCon == null) throw new RuntimeException("Unable to figure out calledcon of a caller pointcut");

         boolean matched = false;
         ClassifiedBindingCollection bindingCol = manager.getBindingCollection();
         synchronized (bindingCol)
         {
            for (AdviceBinding binding : bindingCol.getConstructorCallBindings())
            {
               if (binding.getPointcut().matchesCall(this, callingConstructor, called, calledCon))
               {
                  addConstructorCalledByConPointcut(callingIndex, calledClass, calledConHash, binding);
                  matched = true;
View Full Code Here

            Class<?> called = getClassLoader().loadClass(calledClass);
            Constructor<?> calledCon = MethodHashing.findConstructorByHash(called, calledConHash);
            if (calledCon == null) throw new RuntimeException("Unable to figure out calledcon of a constructor caller pointcut");

            boolean matched = false;
            ClassifiedBindingCollection bindingCol = manager.getBindingCollection();
            synchronized (bindingCol)
            {
               for (AdviceBinding binding : bindingCol.getConstructorCallBindings())
               {
                  if (binding.getPointcut().matchesCall(ClassAdvisor.this, callingMethod, called, calledCon))
                  {
                     addConstructorCalledByMethodPointcut(callingMethodHash, calledClass, calledConHash, binding);
                     matched = true;
View Full Code Here

   /**
    * Called by subclasses
    */
   public AspectManager()
   {
      this.bindingCollection = new ClassifiedBindingCollection();
   }
View Full Code Here

TOP

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

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.