Package org.jboss.aop

Examples of org.jboss.aop.AspectManager


   public static boolean matchesTypedef(Class<?> clazz, ClassExpression classExpr, Advisor advisor)
   {
      String original = classExpr.getOriginal();
      String typedefName = original.substring("$typedef{".length(), original.lastIndexOf("}"));
      AspectManager manager = (advisor != null) ? advisor.getManager() : AspectManager.instance();
      Typedef typedef = manager.getTypedef(typedefName);
      if (typedef == null) return false;
      return typedef.matches(advisor, clazz);
   }
View Full Code Here


         }
        
         if (clazz == null)
         {
            //We need to do all the work again
            AspectManager manager = AspectManager.instance();
            ClassPool pool = manager.findClassPool(classloader);
            generatedClass = generateJoinpointClass(pool, info);
           
            ProtectionDomain pd = advisorClass.getProtectionDomain();
            clazz = toClass(pool, generatedClass.getGenerated(), pd);
            generatedJoinPointClassCache.put(infoAdviceString, generatedClass);
View Full Code Here

         // short cut, avoid cost of else block
         advisorClass = info.getAdvisor().getClass();
      }
      else
      {
         AspectManager manager = info.getAdvisor().getManager();
         try
         {
            advisorClass = manager.getAdvisor(info.getClazz()).getClass();
         }
         catch(ClassCastException e)
         {
            Advisor advisor = manager.findAdvisor(info.getClazz());
            if (advisor != null && !( advisor instanceof ClassAdvisor))
            {
               //The advisor is a ClassContainer or something like that, so ignore this joinpoint
               return;
            }
View Full Code Here

  
   private void checkInstanceAdvisor(Advisor advisor)
   {
      if (advisor instanceof InstanceProxyContainer)
      {
         AspectManager manager = advisor.getManager();
         instanceAdvisorDomainName = manager.getManagerFQN();
      }
   }
View Full Code Here

      AopMetaDataDeployerOutput output = new AopMetaDataDeployerOutput();
      unit.addAttachment(AopMetaDataDeployerOutput.class, output);
     
      if (extractAopBeanMetaDataFactories(unit, deployment, output))
      {
         AspectManager correctManager = unit.getAttachment(AspectManager.class);
         log.debug("Got AspectManager attachment " + correctManager + " for " + unit);
         if (correctManager != aspectManager)
         {
            int sequence = getSequence();
            String scopedManagerName = registerScopedManagerBean(sequence, unit, correctManager, output);
View Full Code Here

            generatedClass= generatedJoinPointClassCache.get(infoAdviceString);
        
         else
         {
            //We need to do all the work again
            AspectManager manager = AspectManager.instance();
            ClassPool pool = manager.findClassPool(classloader);
            ProtectionDomain pd = advisorClass.getProtectionDomain();
            generatedClass = generateJoinpointClass(pool, info, classloader, pd);
            generatedJoinPointClassCache.put(infoAdviceString, generatedClass);
         }
         Object obj = generatedClass.createJoinPointInstance(classloader, info);
View Full Code Here

         // short cut, avoid cost of else block
         advisorClass = info.getAdvisor().getClass();
      }
      else
      {
         AspectManager manager = info.getAdvisor().getManager();
         try
         {
            advisorClass = manager.getAdvisor(info.getClazz()).getClass();
         }
         catch(ClassCastException e)
         {
            Advisor advisor = manager.findAdvisor(info.getClazz());
            if (advisor != null && !( advisor instanceof ClassAdvisor))
            {
               //The advisor is a ClassContainer or something like that, so ignore this joinpoint
               return;
            }
View Full Code Here

            generatedClass= generatedJoinPointClassCache.get(infoAdviceString);
        
         else
         {
            //We need to do all the work again
            AspectManager manager = AspectManager.instance();
            ClassPool pool = manager.findClassPool(classloader);
            ProtectionDomain pd = advisorClass.getProtectionDomain();
            generatedClass = generateJoinpointClass(pool, info, classloader, pd);
            generatedJoinPointClassCache.put(infoAdviceString, generatedClass);
         }
         Object obj = generatedClass.createJoinPointInstance(classloader, info);
View Full Code Here

         // short cut, avoid cost of else block
         advisorClass = info.getAdvisor().getClass();
      }
      else
      {
         AspectManager manager = info.getAdvisor().getManager();
         try
         {
            advisorClass = manager.getAdvisor(info.getClazz()).getClass();
         }
         catch(ClassCastException e)
         {
            Advisor advisor = manager.findAdvisor(info.getClazz());
            if (advisor != null && !( advisor instanceof ClassAdvisor))
            {
               //The advisor is a ClassContainer or something like that, so ignore this joinpoint
               return;
            }
View Full Code Here

         throw new IllegalStateException("No aspect manager configured");
   }
  
   public void deploy(VFSDeploymentUnit unit) throws DeploymentException
   {
      AspectManager manager = getCorrectManager(unit);
      unit.addAttachment(AspectManager.class, manager);
     
      List<VirtualFile> files = unit.getMetaDataFiles(null, AOP_DD_SUFFIX);

      if (isAopArchiveOrFolder(unit))
View Full Code Here

TOP

Related Classes of org.jboss.aop.AspectManager

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.