Package org.jboss.aop

Examples of org.jboss.aop.AspectManager


  
   public void undeploy(VFSDeploymentUnit unit)
   {
      try
      {
         AspectManager manager = getCorrectManager(unit);
         List<VirtualFile> files = unit.getMetaDataFiles(null, AOP_DD_SUFFIX);
  
         if (isAopArchiveOrFolder(unit))
         {
            undeployAnnotations(manager, unit);
View Full Code Here


      super(name);
   }
  
   public void testDeclares()
   {
      AspectManager manager = AspectManager.instance();
     
      boolean doneAnonymous = false;
      int i = 0;
      Iterator<DeclareDef> it = manager.getDeclares();
      while (it.hasNext())
      {
         DeclareDef def = it.next();
         if (def.getName().equals("DeclareError"))
         {
View Full Code Here

     
   }
  
   public void testStackExistsInManager() throws Exception
   {
      AspectManager manager = (AspectManager)getBean("AspectManager");
      AdviceStack stack = manager.getAdviceStack("TestStack");
      assertNotNull(stack);
      assertNotNull(stack.getInterceptorFactories());
      assertEquals(2, stack.getInterceptorFactories().size());
   }
View Full Code Here

      super(name);
   }

   public void testUndeploy() throws Exception
   {
      AspectManager manager = AspectManager.instance();
      checkArtifacts(manager, false);
     
      deploy(getFileName());
      boolean error = true;
      try
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

    * @return
    */
   private Interceptor[] getClientInterceptors(EJBContainer container)
   {
      // Obtain interceptors by stack name via Aspect Manager
      AspectManager manager = AspectManager.instance();
      AdviceStack stack = manager.getAdviceStack(CLIENT_INTERCEPTOR_STACK_NAME);

      if (stack == null)
      {
         throw new RuntimeException("Could not find Advice Stack with name: " + CLIENT_INTERCEPTOR_STACK_NAME);
      }
View Full Code Here

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

      if (isAopArchiveOrFolder(unit))
      {
View Full Code Here

  
   public void undeploy(VFSDeploymentUnit unit)
   {
      try
      {
         AspectManager manager = getCorrectManager(unit);
         List<VirtualFile> files = unit.getMetaDataFiles(null, AOP_DD_SUFFIX);
  
         if (isAopArchiveOrFolder(unit))
         {
            undeployAnnotations(manager, unit);
View Full Code Here

   public static boolean matchesTypedef(CtClass 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

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.