Package org.jboss.aop

Examples of org.jboss.aop.MethodByConInfo


      return JoinPointParameters.TARGET_CALLER_ARGS;
   }

   protected void initialiseJoinPointNames(JoinPointInfo info)
   {
      MethodByConInfo minfo = (MethodByConInfo)info;
      joinpointClassName = getGeneratedJoinPointClassName(
               callingIndex(minfo),
               calledClass(minfo),
               calledMethodHash(minfo));
View Full Code Here


                     TLongObjectHashMap calledMethods = (TLongObjectHashMap) calledClassesMap.get(method.getDeclaringClass().getName());
                     if (calledMethods != null)
                     {
                        long calledHash = MethodHashing.calculateHash(method);
                        //CallerMethodInfo info = (CallerMethodInfo) calledMethods.get(calledHash);
                        MethodByConInfo info = (MethodByConInfo) calledMethods.get(calledHash);

                        if (info != null && info.hasAdvices())
                        {
                           //return advisor.invokeConstructorCaller(index, targetObject, args, info);
                           return advisor.invokeConstructorCaller(info, inv.getCallingObject(), targetObject, args);
                        }
                     }
                  }
               }
            }
         }
      }
      else if (invocation instanceof MethodCalledByMethodInvocation)
      {
         MethodCalledByMethodInvocation inv = (MethodCalledByMethodInvocation) invocation;
         Method callingMethod = inv.getCallingMethod();
         if (isAdvised(callingMethod.getDeclaringClass()))
         {
            ClassAdvisor advisor = AspectManager.instance().getAdvisor(callingMethod.getDeclaringClass());
            if (advisor != null)
            {
               long callingMethodHash = MethodHashing.calculateHash(callingMethod);
               long calledHash = MethodHashing.calculateHash(method);

               HashMap calledClassesMap = (HashMap) advisor.getMethodCalledByMethodInterceptors().get(callingMethodHash);
               if (calledClassesMap != null)
               {
                  TLongObjectHashMap calledMethods = (TLongObjectHashMap) calledClassesMap.get(method.getDeclaringClass().getName());
                  if (calledMethods != null)
                  {
                     //CallerMethodInfo info = (CallerMethodInfo) calledMethods.get(calledHash);
                     MethodByMethodInfo info = (MethodByMethodInfo) calledMethods.get(calledHash);

                     if (info != null  && info.hasAdvices())
                     {
                        //return advisor.invokeCaller(callingMethodHash, targetObject, args, info, inv.getCallingObject());
                        return advisor.invokeCaller(info, inv.getCallingObject(), targetObject, args);
                     }
                  }
View Full Code Here

                     TLongObjectHashMap calledMethods = calledClassesMap.get(method.getDeclaringClass().getName());
                     if (calledMethods != null)
                     {
                        long calledHash = MethodHashing.calculateHash(method);
                        //CallerMethodInfo info = (CallerMethodInfo) calledMethods.get(calledHash);
                        MethodByConInfo info = (MethodByConInfo) calledMethods.get(calledHash);

                        if (info != null && info.hasAdvices())
                        {
                           //return advisor.invokeConstructorCaller(index, targetObject, args, info);
                           return advisor.invokeConstructorCaller(info, inv.getCallingObject(), targetObject, args);
                        }
                     }
                  }
               }
            }
         }
      }
      else if (invocation instanceof MethodCalledByMethodInvocation)
      {
         MethodCalledByMethodInvocation inv = (MethodCalledByMethodInvocation) invocation;
         Method callingMethod = inv.getCallingMethod();
         if (isAdvised(callingMethod.getDeclaringClass()))
         {
            ClassAdvisor advisor = AspectManager.instance().getAdvisor(callingMethod.getDeclaringClass());
            if (advisor != null)
            {
               long callingMethodHash = MethodHashing.calculateHash(callingMethod);
               long calledHash = MethodHashing.calculateHash(method);

               @SuppressWarnings("unchecked")
               HashMap calledClassesMap = (HashMap) advisor.getMethodCalledByMethodInterceptors().get(callingMethodHash);
               if (calledClassesMap != null)
               {
                  TLongObjectHashMap calledMethods = (TLongObjectHashMap) calledClassesMap.get(method.getDeclaringClass().getName());
                  if (calledMethods != null)
                  {
                     //CallerMethodInfo info = (CallerMethodInfo) calledMethods.get(calledHash);
                     MethodByMethodInfo info = (MethodByMethodInfo) calledMethods.get(calledHash);

                     if (info != null  && info.hasAdvices())
                     {
                        //return advisor.invokeCaller(callingMethodHash, targetObject, args, info, inv.getCallingObject());
                        return advisor.invokeCaller(info, inv.getCallingObject(), targetObject, args);
                     }
                  }
View Full Code Here

      return JoinPointParameters.TARGET_CALLER_ARGS;
   }

   protected void initialiseJoinPointNames(JoinPointInfo info)
   {
      MethodByConInfo minfo = (MethodByConInfo)info;
      joinpointClassName = getGeneratedJoinPointClassName(
               callingIndex(minfo),
               calledClass(minfo),
               calledMethodHash(minfo));
View Full Code Here

/*  86 */     return JoinPointGenerator.JoinPointParameters.TARGET_CALLER_ARGS;
/*     */   }
/*     */
/*     */   protected void initialiseJoinPointNames(JoinPointInfo info)
/*     */   {
/*  91 */     MethodByConInfo minfo = (MethodByConInfo)info;
/*  92 */     this.joinpointClassName = getGeneratedJoinPointClassName(callingIndex(minfo), calledClass(minfo), calledMethodHash(minfo));
/*     */
/*  97 */     this.joinpointFieldName = getGeneratedJoinPointFieldName(callingIndex(minfo), calledClass(minfo), calledMethodHash(minfo));
/*     */   }
View Full Code Here

/* 1333 */               TLongObjectHashMap calledMethods = (TLongObjectHashMap)calledClassesMap.get(method.getDeclaringClass().getName());
/* 1334 */               if (calledMethods != null)
/*      */               {
/* 1336 */                 long calledHash = MethodHashing.calculateHash(method);
/*      */
/* 1338 */                 MethodByConInfo info = (MethodByConInfo)calledMethods.get(calledHash);
/*      */
/* 1340 */                 if ((info != null) && (info.hasAdvices()))
/*      */                 {
/* 1343 */                   return advisor.invokeConstructorCaller(info, inv.getCallingObject(), targetObject, args);
/*      */                 }
/*      */               }
/*      */             }
/*      */           }
/*      */         }
/*      */       }
/*      */     }
/* 1351 */     else if ((invocation instanceof MethodCalledByMethodInvocation))
/*      */     {
/* 1353 */       MethodCalledByMethodInvocation inv = (MethodCalledByMethodInvocation)invocation;
/* 1354 */       Method callingMethod = inv.getCallingMethod();
/* 1355 */       if (isAdvised(callingMethod.getDeclaringClass()))
/*      */       {
/* 1357 */         ClassAdvisor advisor = AspectManager.instance().getAdvisor(callingMethod.getDeclaringClass());
/* 1358 */         if (advisor != null)
/*      */         {
/* 1360 */           long callingMethodHash = MethodHashing.calculateHash(callingMethod);
/* 1361 */           long calledHash = MethodHashing.calculateHash(method);
/*      */
/* 1363 */           HashMap calledClassesMap = (HashMap)advisor.getMethodCalledByMethodInterceptors().get(callingMethodHash);
/* 1364 */           if (calledClassesMap != null)
/*      */           {
/* 1366 */             TLongObjectHashMap calledMethods = (TLongObjectHashMap)calledClassesMap.get(method.getDeclaringClass().getName());
/* 1367 */             if (calledMethods != null)
/*      */             {
/* 1370 */               MethodByMethodInfo info = (MethodByMethodInfo)calledMethods.get(calledHash);
/*      */
/* 1372 */               if ((info != null) && (info.hasAdvices()))
/*      */               {
/* 1375 */                 return advisor.invokeCaller(info, inv.getCallingObject(), targetObject, args);
/*      */               }
/*      */             }
/*      */           }
View Full Code Here

                     TLongObjectHashMap calledMethods = (TLongObjectHashMap) calledClassesMap.get(method.getDeclaringClass().getName());
                     if (calledMethods != null)
                     {
                        long calledHash = MethodHashing.calculateHash(method);
                        //CallerMethodInfo info = (CallerMethodInfo) calledMethods.get(calledHash);
                        MethodByConInfo info = (MethodByConInfo) calledMethods.get(calledHash);

                        if (info != null && info.hasAdvices())
                        {
                           //return advisor.invokeConstructorCaller(index, targetObject, args, info);
                           return advisor.invokeConstructorCaller(info, inv.getCallingObject(), targetObject, args);
                        }
                     }
                  }
               }
            }
         }
      }
      else if (invocation instanceof MethodCalledByMethodInvocation)
      {
         MethodCalledByMethodInvocation inv = (MethodCalledByMethodInvocation) invocation;
         Method callingMethod = inv.getCallingMethod();
         if (isAdvised(callingMethod.getDeclaringClass()))
         {
            ClassAdvisor advisor = AspectManager.instance().getAdvisor(callingMethod.getDeclaringClass());
            if (advisor != null)
            {
               long callingMethodHash = MethodHashing.calculateHash(callingMethod);
               long calledHash = MethodHashing.calculateHash(method);

               HashMap calledClassesMap = (HashMap) advisor.getMethodCalledByMethodInterceptors().get(callingMethodHash);
               if (calledClassesMap != null)
               {
                  TLongObjectHashMap calledMethods = (TLongObjectHashMap) calledClassesMap.get(method.getDeclaringClass().getName());
                  if (calledMethods != null)
                  {
                     //CallerMethodInfo info = (CallerMethodInfo) calledMethods.get(calledHash);
                     MethodByMethodInfo info = (MethodByMethodInfo) calledMethods.get(calledHash);

                     if (info != null  && info.hasAdvices())
                     {
                        //return advisor.invokeCaller(callingMethodHash, targetObject, args, info, inv.getCallingObject());
                        return advisor.invokeCaller(info, inv.getCallingObject(), targetObject, args);
                     }
                  }
View Full Code Here

TOP

Related Classes of org.jboss.aop.MethodByConInfo

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.