Examples of AdviceFactory


Examples of org.jboss.aop.advice.AdviceFactory

/*  231 */     if ((aspect == null) || (aspect.length() < 1))
/*  232 */       throw new RuntimeException("Aspect couldnt be found for element: " + element.getNodeName() + ", typo perhaps?");
/*  233 */     AspectDefinition def = this.manager.getAspectDefinition(aspect);
/*  234 */     if (def == null) throw new RuntimeException("advice " + name + " cannot find aspect " + aspect);
/*      */
/*  236 */     AdviceFactory factory = null;
/*  237 */     if (type == null)
/*      */     {
/*  240 */       factory = new AdviceFactory(def, name);
/*      */     }
/*      */     else
/*      */     {
/*  244 */       factory = new AdviceFactory(def, name, type);
/*      */     }
/*      */
/*  247 */     this.manager.addInterceptorFactory(factory.getName(), factory);
/*  248 */     return factory;
/*      */   }
View Full Code Here

Examples of org.jboss.aop.advice.AdviceFactory

/*      */           {
/*  456 */             cflowExpression = new PointcutExpressionParser(new StringReader(cflow)).CFlowExpression();
/*      */           }
/*      */
/*  460 */           org.jboss.aop.advice.AdviceType internalAdviceType = getInternalAdviceType(binding.type());
/*  461 */           AdviceFactory factory = null;
/*  462 */           if (internalAdviceType == org.jboss.aop.advice.AdviceType.AROUND)
/*      */           {
/*  464 */             factory = new AdviceFactory(def, minfo.getName());
/*      */           }
/*      */           else
/*      */           {
/*  468 */             factory = new AdviceFactory(def, minfo.getName(), internalAdviceType);
/*      */           }
/*      */
/*  471 */           this.manager.addInterceptorFactory(factory.getName(), factory);
/*  472 */           InterceptorFactory[] fact = { factory };
/*  473 */           String name = getAspectMethodBindingName(cf, minfo);
/*  474 */           PointcutExpression pointcut = new PointcutExpression(name, pointcutString);
/*  475 */           AdviceBinding abinding = new AdviceBinding(name, pointcut, cflowExpression, cflow, fact);
/*  476 */           this.manager.addBinding(abinding);
View Full Code Here

Examples of org.jboss.aop.advice.AdviceFactory

      if(aspect == null || aspect.length() < 1)
         throw new RuntimeException("Aspect couldnt be found for element: "+element.getNodeName()+", typo perhaps?");
      AspectDefinition def = manager.getAspectDefinition(aspect);
      if (def == null) throw new RuntimeException("advice " + name + " cannot find aspect " + aspect);
     
      AdviceFactory factory = null;
      if (type == null)
      {
         // use default advice type
         factory = new AdviceFactory(def, name);
      }
      else
      {
         factory = new AdviceFactory(def, name, type);
      }
     
      manager.addInterceptorFactory(factory.getName(), factory);
      return factory;
   }
View Full Code Here

Examples of org.jboss.aop.advice.AdviceFactory

            cflowExpression = new PointcutExpressionParser(new StringReader(cflow)).CFlowExpression();

         }
        
         org.jboss.aop.advice.AdviceType internalAdviceType = getInternalAdviceType(binding.type());
         AdviceFactory factory = null;
         if (internalAdviceType == org.jboss.aop.advice.AdviceType.AROUND)
         {
            factory = new AdviceFactory(def, minfo.getName());
         }
         else
         {
            factory = new AdviceFactory(def, minfo.getName(), internalAdviceType);
         }
        
         manager.addInterceptorFactory(factory.getName(), factory);
         InterceptorFactory[] fact = {factory};
         String name = getAspectMethodBindingName(cf, minfo);
         PointcutExpression pointcut = new PointcutExpression(name, pointcutString);
         AdviceBinding abinding = new AdviceBinding(name, pointcut, cflowExpression, cflow, fact);
         manager.addBinding(abinding);
View Full Code Here

Examples of org.jboss.aop.advice.AdviceFactory

            cflowExpression = new PointcutExpressionParser(new StringReader(cflow)).CFlowExpression();

         }
        
         org.jboss.aop.advice.AdviceType internalAdviceType = getInternalAdviceType(binding.type());
         AdviceFactory factory = null;
         if (internalAdviceType == org.jboss.aop.advice.AdviceType.AROUND)
         {
            factory = new AdviceFactory(def, minfo.getName());
         }
         else
         {
            factory = new AdviceFactory(def, minfo.getName(), internalAdviceType);
         }
        
         manager.addInterceptorFactory(factory.getName(), factory);
         InterceptorFactory[] fact = {factory};
         String name = getAspectMethodBindingName(cf, minfo);
         PointcutExpression pointcut = new PointcutExpression(name, pointcutString);
         AdviceBinding abinding = new AdviceBinding(name, pointcut, cflowExpression, cflow, fact);
         manager.addBinding(abinding);
View Full Code Here

Examples of org.jboss.aop.advice.AdviceFactory

      if(aspect == null || aspect.length() < 1)
         throw new RuntimeException("Aspect couldnt be found for element: "+element.getNodeName()+", typo perhaps?");
      AspectDefinition def = manager.getAspectDefinition(aspect);
      if (def == null) throw new RuntimeException("advice " + name + " cannot find aspect " + aspect);
     
      AdviceFactory factory = null;
      if (type == null)
      {
         // use default advice type
         factory = new AdviceFactory(def, name);
      }
      else
      {
         factory = new AdviceFactory(def, name, type);
      }
     
      manager.addInterceptorFactory(factory.getName(), factory);
      return factory;
   }
View Full Code Here

Examples of org.jboss.aop.advice.AdviceFactory

      AdviceBinding binding = new AdviceBinding(
            "execution(void *PreparedPOJO->someMethod(..))", null);
      AspectDefinition aspectDefinition = AspectManager.instance()
            .getAspectDefinition(AnnotatedAspectFactory.class.getName());
      assertNotNull(aspectDefinition);
      binding.addInterceptorFactory(new AdviceFactory(aspectDefinition,
            "advice"));
      AspectManager.instance().addBinding(binding);

      PreparedPOJO pojo = new PreparedPOJO();
      pojo.someMethod();
View Full Code Here

Examples of org.jboss.aop.advice.AdviceFactory

      AspectDefinition def = manager.getAspectDefinition(aspect);
      if (def == null) throw new RuntimeException("advice " + name + " cannot find aspect " + aspect);
     
      String tagName = element.getTagName();
     
      AdviceFactory factory = null;
      if (tagName.equals("advice"))
      {
         factory = new AdviceFactory(def, name);
      }
      else if (tagName.equals("before"))
      {
         factory = new BeforeFactory(def, name);
      }
      else if (tagName.equals("after"))
      {
         factory = new AfterFactory(def, name);
      }
      else if (tagName.equals("throwing"))
      {
         factory = new ThrowingFactory(def, name);
      }
      manager.addInterceptorFactory(factory.getName(), factory);
      return factory;
   }
View Full Code Here

Examples of org.jboss.aop.advice.AdviceFactory

         if (cflow != null)
         {
            cflowExpression = new PointcutExpressionParser(new StringReader(cflow)).CFlowExpression();

         }
         AdviceFactory factory = new AdviceFactory(def, minfo.getName());
         manager.addInterceptorFactory(factory.getName(), factory);
         InterceptorFactory[] fact = {factory};
         String name = getAspectMethodBindingName(cf, minfo);
         PointcutExpression pointcut = new PointcutExpression(name, pointcutString);
         AdviceBinding abinding = new AdviceBinding(name, pointcut, cflowExpression, cflow, fact);
         manager.addBinding(abinding);
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.