Package org.jboss.aop.joinpoint

Examples of org.jboss.aop.joinpoint.MethodJoinpoint


/*     */   public static Interceptor createInterceptor(Advisor advisor, Joinpoint joinpoint, AspectDefinition def, String adviceName)
/*     */     throws Exception
/*     */   {
/*  53 */     if ((joinpoint instanceof MethodJoinpoint))
/*     */     {
/*  55 */       MethodJoinpoint method = (MethodJoinpoint)joinpoint;
/*  56 */       if (Modifier.isStatic(method.getMethod().getModifiers()))
/*     */       {
/*  58 */         return PerVmAdvice.generateInterceptor(joinpoint, def.getFactory().createPerJoinpoint(advisor, joinpoint), adviceName);
/*     */       }
/*     */     } else {
/*  61 */       if ((joinpoint instanceof ConstructorJoinpoint))
/*     */       {
/*  63 */         return PerVmAdvice.generateInterceptor(joinpoint, def.getFactory().createPerJoinpoint(advisor, joinpoint), adviceName);
/*     */       }
/*  65 */       if ((joinpoint instanceof MethodCalledByMethodJoinpoint))
/*     */       {
/*  67 */         MethodCalledByMethodJoinpoint method = (MethodCalledByMethodJoinpoint)joinpoint;
/*  68 */         if (Modifier.isStatic(method.getCalling().getModifiers()))
/*     */         {
/*  70 */           return PerVmAdvice.generateInterceptor(joinpoint, def.getFactory().createPerJoinpoint(advisor, joinpoint), adviceName);
/*     */         }
/*     */       }
/*  73 */       else if ((joinpoint instanceof ConstructorCalledByMethodJoinpoint))
/*     */       {
/*  75 */         ConstructorCalledByMethodJoinpoint method = (ConstructorCalledByMethodJoinpoint)joinpoint;
/*  76 */         if (Modifier.isStatic(method.getCalling().getModifiers()))
/*     */         {
/*  78 */           return PerVmAdvice.generateInterceptor(joinpoint, def.getFactory().createPerJoinpoint(advisor, joinpoint), adviceName);
/*     */         }
/*     */       }
/*  81 */       else if ((joinpoint instanceof FieldJoinpoint))
View Full Code Here


/*     */
/*     */   private Joinpoint getJoinpoint(Invocation invocation)
/*     */   {
/* 431 */     if ((invocation instanceof MethodInvocation))
/*     */     {
/* 433 */       return new MethodJoinpoint(((MethodInvocation)invocation).getMethod());
/*     */     }
/* 435 */     if ((invocation instanceof FieldInvocation))
/*     */     {
/* 437 */       return new FieldJoinpoint(((FieldInvocation)invocation).getField());
/*     */     }
View Full Code Here

/*  269 */           if (AspectManager.verbose)
/*      */           {
/*  271 */             System.err.println("method matched binding " + binding.getPointcut().getExpr() + " " + method.toString());
/*      */           }
/*  273 */           binding.addAdvisor(this);
/*  274 */           pointcutResolved(info, binding, new MethodJoinpoint(method));
/*      */         }
/*      */       }
/*      */     }
/*      */   }
View Full Code Here

/*     */   public static Interceptor createInterceptor(Advisor advisor, Joinpoint joinpoint, AspectDefinition def)
/*     */     throws Exception
/*     */   {
/*  49 */     if ((joinpoint instanceof MethodJoinpoint))
/*     */     {
/*  51 */       MethodJoinpoint method = (MethodJoinpoint)joinpoint;
/*  52 */       if (Modifier.isStatic(method.getMethod().getModifiers()))
/*     */       {
/*  54 */         return (Interceptor)def.getFactory().createPerJoinpoint(advisor, joinpoint);
/*     */       }
/*     */     } else {
/*  57 */       if ((joinpoint instanceof ConstructorJoinpoint))
/*     */       {
/*  59 */         return (Interceptor)def.getFactory().createPerJoinpoint(advisor, joinpoint);
/*     */       }
/*  61 */       if ((joinpoint instanceof MethodCalledByMethodJoinpoint))
/*     */       {
/*  63 */         MethodCalledByMethodJoinpoint method = (MethodCalledByMethodJoinpoint)joinpoint;
/*  64 */         if (Modifier.isStatic(method.getCalling().getModifiers()))
/*     */         {
/*  66 */           return (Interceptor)def.getFactory().createPerJoinpoint(advisor, joinpoint);
/*     */         }
/*     */       }
/*  69 */       else if ((joinpoint instanceof ConstructorCalledByMethodJoinpoint))
/*     */       {
/*  71 */         ConstructorCalledByMethodJoinpoint method = (ConstructorCalledByMethodJoinpoint)joinpoint;
/*  72 */         if (Modifier.isStatic(method.getCalling().getModifiers()))
/*     */         {
/*  74 */           return (Interceptor)def.getFactory().createPerJoinpoint(advisor, joinpoint);
/*     */         }
/*     */       }
/*  77 */       else if ((joinpoint instanceof FieldJoinpoint))
View Full Code Here

/*    */
/*    */   public Object createPerJoinpoint(Advisor advisor, Joinpoint jp)
/*    */   {
/* 61 */     if (!(jp instanceof MethodJoinpoint))
/* 62 */       throw new IllegalArgumentException("Joinpoint is not a method: " + jp);
/* 63 */     MethodJoinpoint methodJoinpoint = (MethodJoinpoint)MethodJoinpoint.class.cast(jp);
/* 64 */     Method method = methodJoinpoint.getMethod();
/* 65 */     Remove rm = (Remove)advisor.resolveAnnotation(method, Remove.class);
/* 66 */     if (rm == null)
/*    */     {
/* 68 */       log.warn("Cannot find @" + Remove.class.getName() + " for " + method + " assuming defaults");
/* 69 */       rm = new RemoveImpl();
View Full Code Here

               if (AspectManager.verbose)
               {
                  System.err.println("method matched binding " + binding.getPointcut().getExpr() + " " + method.toString());    
               }
               binding.addAdvisor(this);
               pointcutResolved(info, binding, new MethodJoinpoint(method));
            }
         }
      }     
   }
View Full Code Here

      this.hash = other.hash;
   }
  
   protected Joinpoint internalGetJoinpoint()
   {
      return new MethodJoinpoint(advisedMethod);
   }
View Full Code Here

  
   private void applyBinding(ArrayList applicableBindings, AdviceBinding binding)
   {
      applicableBindings.add(binding);
      binding.addAdvisor(advisor);
      advisor.pointcutResolved(info, binding, new MethodJoinpoint(info.getMethod()));
   }
View Full Code Here

               if (AspectManager.verbose)
               {
                  System.err.println("method matched binding " + binding.getPointcut().getExpr() + " " + method.toString());    
               }
               binding.addAdvisor(this);
               pointcutResolved(info, binding, new MethodJoinpoint(method));
            }
         }
      }     
   }
View Full Code Here

{
   public static Interceptor createInterceptor(Advisor advisor, Joinpoint joinpoint, AspectDefinition def) throws Exception
   {
      if (joinpoint instanceof MethodJoinpoint)
      {
         MethodJoinpoint method = (MethodJoinpoint) joinpoint;
         if (Modifier.isStatic(method.getMethod().getModifiers()))
         {
            return (Interceptor) def.getFactory().createPerJoinpoint(advisor, joinpoint);
         }
      }
      else if (joinpoint instanceof ConstructorJoinpoint)
      {
         return (Interceptor) def.getFactory().createPerJoinpoint(advisor, joinpoint);
      }
      else if (joinpoint instanceof MethodCalledByMethodJoinpoint)
      {
         MethodCalledByMethodJoinpoint method = (MethodCalledByMethodJoinpoint) joinpoint;
         if (Modifier.isStatic(method.getCalling().getModifiers()))
         {
            return (Interceptor) def.getFactory().createPerJoinpoint(advisor, joinpoint);
         }
      }
      else if (joinpoint instanceof ConstructorCalledByMethodJoinpoint)
      {
         ConstructorCalledByMethodJoinpoint method = (ConstructorCalledByMethodJoinpoint) joinpoint;
         if (Modifier.isStatic(method.getCalling().getModifiers()))
         {
            return (Interceptor) def.getFactory().createPerJoinpoint(advisor, joinpoint);
         }
      }
      else if (joinpoint instanceof FieldJoinpoint)
View Full Code Here

TOP

Related Classes of org.jboss.aop.joinpoint.MethodJoinpoint

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.