Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   /*      */ package org.jboss.aop;
   /*      */ 
   /*      */ import  gnu.trove.TLongObjectHashMap;
   /*      */ import java.io.PrintStream;
   /*      */ import java.lang.reflect.Field;
   /*      */ import java.lang.reflect.Method;
   /*      */ import java.util.ArrayList;
   /*      */ import java.util.HashMap;
   /*      */ import java.util.HashSet;
  /*      */ import java.util.Iterator;
  /*      */ import java.util.Map;
  /*      */ import java.util.Set;
  /*      */ import java.util.concurrent.ConcurrentHashMap;
  /*      */ import org.jboss.aop.advice.AdviceBinding;
  /*      */ import org.jboss.aop.advice.AspectDefinition;
  /*      */ import org.jboss.aop.advice.AspectFactory;
  /*      */ import org.jboss.aop.advice.InterceptorFactory;
  /*      */ import org.jboss.aop.advice.PrecedenceSorter;
  /*      */ import org.jboss.aop.instrument.JoinPointGenerator;
  /*      */ import org.jboss.aop.joinpoint.FieldJoinpoint;
  /*      */ import org.jboss.aop.joinpoint.Joinpoint;
  /*      */ import org.jboss.aop.joinpoint.MethodJoinpoint;
  /*      */ import org.jboss.aop.pointcut.Pointcut;
  /*      */ import org.jboss.aop.pointcut.PointcutMethodMatch;
  /*      */ 
  /*      */ public class GeneratedClassAdvisor extends ClassAdvisor
  /*      */ {
  /*      */   public static final String ADD_METHOD_INFO = "addMethodInfo";
  /*      */   public static final String ADD_CONSTRUCTOR_INFO = "addConstructorInfo";
  /*      */   public static final String ADD_CONSTRUCTION_INFO = "addConstructionInfo";
  /*      */   public static final String ADD_FIELD_READ_INFO = "addFieldReadInfo";
  /*      */   public static final String ADD_FIELD_WRITE_INFO = "addFieldWriteInfo";
  /*      */   public static final String GET_PARENT_ADVISOR = "getParentAdvisor";
  /*   71 */   MethodInterceptors methodInfos = new MethodInterceptors(this);
  /*   72 */   ArrayList constructorInfos = new ArrayList();
  /*   73 */   ArrayList constructionInfos = new ArrayList();
  /*   74 */   ArrayList fieldReadInfos = new ArrayList();
  /*   75 */   ArrayList fieldWriteInfos = new ArrayList();
  /*      */ 
  /*   77 */   ArrayList overriddenMethods = new ArrayList();
  /*      */ 
  /*      */ 
  /*      */ 
  /*      */ 
  /*      */   boolean initialisedSuperClasses;
  /*      */   private int version;
  /*      */   AdvisorStrategy advisorStrategy;
  /*      */ 
  /*      */   protected GeneratedClassAdvisor(String classname)
  /*      */   {
  /*  104 */     super(classnamenull);
  /*  105 */     this. = new ClassAdvisorStrategy(null);
  /*      */   }
  /*      */ 
  /*      */   protected GeneratedClassAdvisor(String classnameGeneratedClassAdvisor parent)
  /*      */   {
  /*  110 */     super(classnamenull);
  /*  111 */     this. = new InstanceAdvisorStrategy(parent);
  /*      */   }
  /*      */ 
  /*      */   public void cleanup()
  /*      */   {
  /*  117 */     super.cleanup();
  /*  118 */     this. = null;
  /*  119 */     this. = null;
  /*      */ 
  /*  121 */     Map subscribedSubDomains = getManager().getSubscribedSubDomains();
  /*      */     Iterator it;
  /*  122 */     synchronized (subscribedSubDomains)
  /*      */     {
  /*  124 */       for (it = subscribedSubDomains.keySet().iterator(); it.hasNext(); )
  /*      */       {
  /*  126 */         GeneratedAdvisorDomain manager = (GeneratedAdvisorDomain)it.next();
  /*  127 */         Map advisors = manager.getAdvisors();
  /*  128 */         it.remove();
  /*      */       }
  /*      */     }
  /*      */   }
  /*      */ 
  /*      */   protected void initialise(Class clazzAspectManager manager)
  /*      */   {
  /*  135 */     this..initialise(clazzmanager);
 /*      */   }
 /*      */ 
 /*      */   protected void initialiseCallers()
 /*      */   {
 /*      */   }
 /*      */ 
 /*      */   protected void initialiseInfosForInstance()
 /*      */   {
 /*      */   }
 /*      */ 
 /*      */   protected MethodInfo copyInfoFromClassAdvisor(MethodInfo info)
 /*      */   {
 /*  159 */     MethodInfo copy = (MethodInfo)info.copy();
 /*  160 */     copy.setAdvisor(this);
 /*  161 */     addMethodInfo(copy);
 /*  162 */     return copy;
 /*      */   }
 /*      */ 
 /*      */   protected FieldInfo copyInfoFromClassAdvisor(FieldInfo info)
 /*      */   {
 /*  170 */     FieldInfo copy = (FieldInfo)info.copy();
 /*  171 */     copy.setAdvisor(this);
 /*  172 */     if (copy.isRead())
 /*      */     {
 /*  174 */       addFieldReadInfo(copy);
 /*      */     }
 /*      */     else
 /*      */     {
 /*  178 */       addFieldWriteInfo(copy);
 /*      */     }
 /*  180 */     return copy;
 /*      */   }
 /*      */ 
 /*      */   protected ConByConInfo copyInfoFromClassAdvisor(ConByConInfo info)
 /*      */   {
 /*  188 */     ConByConInfo copy = (ConByConInfo)info.copy();
 /*  189 */     copy.setAdvisor(this);
 /*  190 */     return copy;
 /*      */   }
 /*      */ 
 /*      */   protected MethodByConInfo copyInfoFromClassAdvisor(MethodByConInfo info)
 /*      */   {
 /*  198 */     MethodByConInfo copy = (MethodByConInfo)info.copy();
 /*  199 */     copy.setAdvisor(this);
 /*  200 */     return copy;
 /*      */   }
 /*      */ 
 /*      */   protected ConByMethodInfo copyInfoFromClassAdvisor(ConByMethodInfo info)
 /*      */   {
 /*  208 */     ConByMethodInfo copy = (ConByMethodInfo)info.copy();
 /*  209 */     copy.setAdvisor(this);
 /*  210 */     return copy;
 /*      */   }
 /*      */ 
 /*      */   protected MethodByMethodInfo copyInfoFromClassAdvisor(MethodByMethodInfo info)
 /*      */   {
 /*  218 */     MethodByMethodInfo copy = (MethodByMethodInfo)info.copy();
 /*  219 */     copy.setAdvisor(this);
 /*  220 */     return copy;
 /*      */   }
 /*      */ 
 /*      */   protected void rebuildInterceptors()
 /*      */   {
 /*  227 */     this. += 1;
 /*  228 */     this..rebuildInterceptors();
 /*      */   }
 /*      */ 
 /*      */   protected synchronized void internalRebuildInterceptors()
 /*      */   {
 /*  237 */     super.rebuildInterceptors();
 /*      */   }
 /*      */ 
 /*      */   protected void checkVersion()
 /*      */   {
 /*  245 */     this..checkVersion();
 /*      */   }
 /*      */ 
 /*      */   protected void doRebuildForInstance()
 /*      */   {
 /*      */   }
 /*      */ 
 /*      */   protected void handleOverriddenMethods(AdviceBinding binding)
 /*      */   {
 /*      */     Iterator it;
 /*  258 */     if ((this. != null) && (this..size() > 0))
 /*      */     {
 /*  260 */       for (it = this..iterator(); it.hasNext(); )
 /*      */       {
 /*  262 */         MethodInfo info = (MethodInfo)it.next();
 /*  263 */         Method method = info.getMethod();
 /*  264 */         PointcutMethodMatch match = binding.getPointcut().matchesExecution(thismethod);
 /*      */ 
 /*  266 */         if ((match != null) && (match.isMatch()))
 /*      */         {
 /*  268 */           this..add(binding);
 /*  269 */           if (.)
 /*      */           {
 /*  271 */             ..println("method matched binding " + binding.getPointcut().getExpr() + " " + method.toString());
 /*      */           }
 /*  273 */           binding.addAdvisor(this);
 /*  274 */           pointcutResolved(infobindingnew MethodJoinpoint(method));
 /*      */         }
 /*      */       }
 /*      */     }
 /*      */   }
 /*      */ 
 /*      */   protected void resolveMethodPointcut(MethodInterceptors newMethodInterceptorsAdviceBinding binding)
 /*      */   {
 /*  284 */     if (classAdvisor == null)
 /*      */     {
 /*  287 */       super.resolveMethodPointcut(newMethodInterceptorsbinding);
 /*  288 */       handleOverriddenMethods(binding);
 /*      */     }
 /*      */   }
 /*      */ 
 /*      */   protected void resolveFieldPointcut(ArrayList newFieldInfosAdviceBinding bindingboolean write)
 /*      */   {
 /*  297 */     if (classAdvisor == null)
 /*      */     {
 /*  300 */       super.resolveFieldPointcut(newFieldInfosbindingwrite);
 /*      */     }
 /*      */   }
 /*      */ 
 /*      */   protected void resolveConstructorPointcut(ArrayList newConstructorInfosAdviceBinding binding)
 /*      */   {
 /*  307 */     this..resolveConstructorPointcut(newConstructorInfosbinding);
 /*      */   }
 /*      */ 
 /*      */   protected void resolveConstructionPointcut(ArrayList newConstructionInfosAdviceBinding binding)
 /*      */   {
 /*  313 */     this..resolveConstructionPointcut(newConstructionInfosbinding);
 /*      */   }
 /*      */ 
 /*      */   protected void initialiseMethods()
 /*      */   {
 /*      */   }
 /*      */ 
 /*      */   protected void addMethodInfo(MethodInfo mi)
 /*      */   {
 /*  328 */     MethodInfo old = this..getMethodInfo(mi.getHash());
 /*  329 */     if (old != null)
 /*      */     {
 /*  331 */       this..add(old);
 /*      */     }
 /*  333 */     this..put(mi.getHash(), mi);
 /*      */ 
 /*  335 */     this..makeAccessibleMethod(mi);
 /*      */   }
 /*      */ 
 /*      */   protected MethodInterceptors initializeMethodChain()
 /*      */   {
 /*  343 */     long[] keys = this..keys();
 /*  344 */     for (int i = 0; i < keys.lengthi++)
 /*      */     {
 /*  346 */       MethodMatchInfo matchInfo = this..getMatchInfo(keys[i]);
 /*      */ 
 /*  348 */       if ((this.) && (matchInfo != null))
 /*      */       {
 /*  350 */         matchInfo.clear();
 /*      */       }
 /*      */ 
 /*  353 */       if (matchInfo != null)
 /*      */         continue;
 /*  355 */       MethodInfo info = new MethodInfo();
 /*  356 */       Method amethod = (Method)this..get(keys[i]);
 /*  357 */       info.setAdvisedMethod(amethod);
 /*  358 */       info.setUnadvisedMethod(amethod);
 /*  359 */       info.setHash(keys[i]);
 /*  360 */       info.setAdvisor(this);
 /*  361 */       this..put(keys[i], info);
 /*      */     }
 /*      */ 
 /*  365 */     return this.;
 /*      */   }
 /*      */ 
 /*      */   protected void initialiseConstructors()
 /*      */   {
 /*      */   }
 /*      */ 
 /*      */   protected void addConstructorInfo(ConstructorInfo ci)
 /*      */   {
 /*  381 */     this..add(ci);
 /*      */ 
 /*  383 */     SecurityActions.setAccessible(ci.getConstructor());
 /*      */   }
 /*      */ 
 /*      */   protected void createInterceptorChains()
 /*      */     throws Exception
 /*      */   {
 /*  389 */     this..createInterceptorChains();
 /*      */   }
 /*      */ 
 /*      */   protected ArrayList initializeConstructorChain()
 /*      */   {
 /*      */     Iterator it;
 /*  395 */     if (this.)
 /*      */     {
 /*  397 */       for (it = this..iterator(); it.hasNext(); )
 /*      */       {
 /*  399 */         ((ConstructorInfo)it.next()).clear();
 /*      */       }
 /*      */     }
 /*  402 */     return this.;
 /*      */   }
 /*      */ 
 /*      */   protected void initialiseConstructions()
 /*      */   {
 /*      */   }
 /*      */ 
 /*      */   protected void addConstructionInfo(ConstructionInfo ci)
 /*      */   {
 /*  417 */     this..add(ci);
 /*      */   }
 /*      */ 
 /*      */   protected ArrayList initializeConstructionChain()
 /*      */   {
 /*      */     Iterator it;
 /*  423 */     if (this.)
 /*      */     {
 /*  425 */       for (it = this..iterator(); it.hasNext(); )
 /*      */       {
 /*  427 */         ((ConstructionInfo)it.next()).clear();
 /*      */       }
 /*      */     }
 /*  430 */     return this.;
 /*      */   }
 /*      */ 
 /*      */   protected void initialiseFieldReads()
 /*      */   {
 /*      */   }
 /*      */ 
 /*      */   protected void addFieldReadInfo(FieldInfo fi)
 /*      */   {
 /*  445 */     this..add(fi);
 /*      */ 
 /*  447 */     this..makeAccessibleField(fi);
 /*      */   }
 /*      */ 
 /*      */   protected ArrayList initializeFieldReadChain()
 /*      */   {
 /*  453 */     return mergeFieldInfos(this.true);
 /*      */   }
 /*      */ 
 /*      */   protected void initialiseFieldWrites()
 /*      */   {
 /*      */   }
 /*      */ 
 /*      */   protected void addFieldWriteInfo(FieldInfo fi)
 /*      */   {
 /*  468 */     this..add(fi);
 /*      */ 
 /*  470 */     this..makeAccessibleField(fi);
 /*      */   }
 /*      */ 
 /*      */   protected ArrayList initializeFieldWriteChain()
 /*      */   {
 /*  476 */     return mergeFieldInfos(this.false);
 /*      */   }
 /*      */ 
 /*      */   private ArrayList mergeFieldInfos(ArrayList advisedInfosboolean read)
 /*      */   {
 /*  484 */     ArrayList newInfos = new ArrayList(this..length);
 /*      */ 
 /*  486 */     FieldInfo nextFieldInfo = null;
 /*  487 */     Iterator it = advisedInfos.iterator();
 /*  488 */     if (it.hasNext())
 /*      */     {
 /*  490 */       nextFieldInfo = (FieldInfo)it.next();
 /*      */     }
 /*      */ 
 /*  493 */     for (int i = 0; i < this..lengthi++)
 /*      */     {
 /*  495 */       if ((nextFieldInfo != null) && (nextFieldInfo.getIndex() == i))
 /*      */       {
 /*  497 */         if (this.)
 /*      */         {
 /*  499 */           nextFieldInfo.clear();
 /*      */         }
 /*      */ 
 /*  502 */         newInfos.add(nextFieldInfo);
 /*  503 */         if (it.hasNext())
 /*      */         {
 /*  505 */           nextFieldInfo = (FieldInfo)it.next();
 /*      */         }
 /*      */         else
 /*      */         {
 /*  509 */           nextFieldInfo = null;
 /*      */         }
 /*      */       }
 /*      */       else
 /*      */       {
 /*  514 */         FieldInfo info = new FieldInfo(thisread);
 /*  515 */         info.setAdvisedField(this.[i]);
 /*  516 */         info.setIndex(i);
 /*  517 */         newInfos.add(info);
 /*      */       }
 /*      */     }
 /*      */ 
 /*  521 */     return newInfos;
 /*      */   }
 /*      */ 
 /*      */   protected void finalizeChains(MethodInterceptors newMethodInfosArrayList newFieldReadInfosArrayList newFieldWriteInfosArrayList newConstructorInfosArrayList newConstructionInfos)
 /*      */   {
 /*  528 */     if (classAdvisor != null)
 /*      */     {
 /*      */       Iterator it;
 /*  533 */       synchronized (this.)
 /*      */       {
 /*  535 */         this..addAll(classAdvisor.adviceBindings);
 /*  536 */         for (it = this..iterator(); it.hasNext(); )
 /*      */         {
 /*  538 */           AdviceBinding binding = (AdviceBinding)it.next();
 /*  539 */           binding.addAdvisor(this);
 /*      */         }
 /*      */       }
 /*      */     }
 /*  543 */     super.finalizeChains(newMethodInfosnewFieldReadInfosnewFieldWriteInfosnewConstructorInfosnewConstructionInfos);
 /*      */   }
 /*      */ 
 /*      */   protected void finalizeMethodChain(MethodInterceptors newMethodInterceptors)
 /*      */   {
 /*  550 */     if (classAdvisor != null)
 /*      */     {
 /*  553 */       easyFinalizeMethodChainForInstance(classAdvisornewMethodInterceptors);
 /*      */     }
 /*      */     else
 /*      */     {
 /*  558 */       fullWorkFinalizeMethodChain(newMethodInterceptors);
 /*      */     }
 /*      */   }
 /*      */ 
 /*      */   private void easyFinalizeMethodChainForInstance(ClassAdvisor classAdvisorMethodInterceptors newMethodInterceptors)
 /*      */   {
 /*  564 */     long[] keys = newMethodInterceptors.keys();
 /*  565 */     for (int i = 0; i < keys.lengthi++)
 /*      */     {
 /*  567 */       MethodInfo classMethodInfo = classAdvisor.getMethodInfo(keys[i]);
 /*  568 */       MethodMatchInfo matchInfo = newMethodInterceptors.getMatchInfo(keys[i]);
 /*  569 */       MethodInfo myMethodInfo = matchInfo.getInfo();
 /*  570 */       myMethodInfo.cloneChains(classMethodInfo);
 /*      */ 
 /*  572 */       if (!updateOldInfo(this.myMethodInfo.))
 /*      */         continue;
 /*  574 */       MethodJoinPointGenerator generator = getJoinPointGenerator(myMethodInfo);
 /*  575 */       generator.rebindJoinpoint(myMethodInfo);
 /*      */     }
 /*      */   }
 /*      */ 
 /*      */   private void fullWorkFinalizeMethodChain(MethodInterceptors newMethodInterceptors)
 /*      */   {
 /*  583 */     TLongObjectHashMap newMethodInfos = new TLongObjectHashMap();
 /*      */ 
 /*  585 */     long[] keys = newMethodInterceptors.keys();
 /*  586 */     for (int i = 0; i < keys.lengthi++)
 /*      */     {
 /*  588 */       MethodMatchInfo matchInfo = newMethodInterceptors.getMatchInfo(keys[i]);
 /*  589 */       matchInfo.populateBindings();
 /*      */ 
 /*  591 */       MethodInfo info = matchInfo.getInfo();
 /*  592 */       newMethodInfos.put(keys[i], info);
 /*      */ 
 /*  594 */       MethodJoinPointGenerator generator = getJoinPointGenerator(info);
 /*  595 */       finalizeChainAndRebindJoinPoint(this.infogenerator.);
 /*      */     }
 /*  597 */     this. = newMethodInfos;
 /*      */     Iterator it;
 /*  600 */     if ((this. != null) && (this..size() > 0))
 /*      */     {
 /*  602 */       for (it = this..iterator(); it.hasNext(); )
 /*      */       {
 /*  604 */         MethodInfo info = (MethodInfo)it.next();
 /*      */ 
 /*  606 */         MethodJoinPointGenerator generator = getJoinPointGenerator(info);
 /*  607 */         finalizeChainAndRebindJoinPoint(this.infogenerator.);
 /*      */       }
 /*      */     }
 /*      */   }
 /*      */ 
 /*      */   protected void finalizeFieldReadChain(ArrayList newFieldInfos)
 /*      */   {
 /*  616 */     if (classAdvisor != null)
 /*      */     {
 /*  619 */       easyFinalizeFieldChainForInstance(this.classAdvisor.getFieldReadInfos(), newFieldInfos.);
 /*      */     }
 /*      */     else
 /*      */     {
 /*  624 */       fullWorkFinalizeFieldChain(this.newFieldInfos.);
 /*      */     }
 /*      */   }
 /*      */ 
 /*      */   protected void finalizeFieldWriteChain(ArrayList newFieldInfos)
 /*      */   {
 /*  632 */     if (classAdvisor != null)
 /*      */     {
 /*  635 */       easyFinalizeFieldChainForInstance(this.classAdvisor.getFieldWriteInfos(), newFieldInfos.);
 /*      */     }
 /*      */     else
 /*      */     {
 /*  640 */       fullWorkFinalizeFieldChain(this.newFieldInfos.);
 /*      */     }
 /*      */   }
 /*      */ 
 /*      */   private void easyFinalizeFieldChainForInstance(Map oldFieldInfosFieldInfo[] classFieldInfosArrayList newFieldInfosOldInfoMaps oldInfoMapInstance)
 /*      */   {
 /*  647 */     if (newFieldInfos.size() > 0)
 /*      */     {
 /*  649 */       for (int i = 0; i < newFieldInfos.size(); i++)
 /*      */       {
 /*  651 */         FieldInfo myInfo = (FieldInfo)newFieldInfos.get(i);
 /*  652 */         myInfo.cloneChains(classFieldInfos[i]);
 /*      */ 
 /*  654 */         if (!updateOldInfo(oldFieldInfosmyInfooldInfoMapInstance))
 /*      */           continue;
 /*  656 */         FieldJoinPointGenerator generator = getJoinPointGenerator(myInfo);
 /*  657 */         generator.rebindJoinpoint(myInfo);
 /*      */       }
 /*      */     }
 /*      */   }
 /*      */ 
 /*      */   private void fullWorkFinalizeFieldChain(Map oldFieldInfosArrayList newFieldInfosOldInfoMaps oldInfoMapInstance)
 /*      */   {
 /*  666 */     for (int i = 0; i < newFieldInfos.size(); i++)
 /*      */     {
 /*  668 */       FieldInfo info = (FieldInfo)newFieldInfos.get(i);
 /*  669 */       FieldJoinPointGenerator generator = getJoinPointGenerator(info);
 /*  670 */       finalizeChainAndRebindJoinPoint(oldFieldInfosinfogeneratoroldInfoMapInstance);
 /*      */     }
 /*      */   }
 /*      */ 
 /*      */   protected void finalizeConstructorChain(ArrayList newConstructorInfos)
 /*      */   {
 /*  677 */     this..finalizeConstructorChain(newConstructorInfos);
 /*      */   }
 /*      */ 
 /*      */   protected void finalizeConstructionChain(ArrayList newConstructionInfos)
 /*      */   {
 /*  683 */     this..finalizeConstructionChain(newConstructionInfos);
 /*      */   }
 /*      */ 
 /*      */   protected void finalizeMethodCalledByMethodInterceptorChain(MethodByMethodInfo info)
 /*      */   {
 /*  689 */     MethodByMethodJoinPointGenerator generator = getJoinPointGenerator(info);
 /*  690 */     finalizeChainAndRebindJoinPoint(this.infogenerator.);
 /*      */   }
 /*      */ 
 /*      */   protected void finalizeConCalledByMethodInterceptorChain(ConByMethodInfo info)
 /*      */   {
 /*  696 */     ConByMethodJoinPointGenerator generator = getJoinPointGenerator(info);
 /*  697 */     finalizeChainAndRebindJoinPoint(this.infogenerator.);
 /*      */   }
 /*      */ 
 /*      */   protected void finalizeConCalledByConInterceptorChain(ConByConInfo info)
 /*      */   {
 /*  703 */     ConByConJoinPointGenerator generator = getJoinPointGenerator(info);
 /*  704 */     finalizeChainAndRebindJoinPoint(this.infogenerator.);
 /*      */   }
 /*      */ 
 /*      */   protected void finalizeMethodCalledByConInterceptorChain(MethodByConInfo info)
 /*      */   {
 /*  712 */     ConcurrentHashMap map = (ConcurrentHashMap)this..get(info.getJoinpoint());
 /*  713 */     if (map == null)
 /*      */     {
 /*  715 */       map = new ConcurrentHashMap();
 /*  716 */       initJoinPointGeneratorsMap();
 /*  717 */       this..put(info.getJoinpoint(), map);
 /*  718 */       map = (ConcurrentHashMap)this..get(info.getJoinpoint());
 /*      */     }
 /*      */ 
 /*  721 */     MethodByConJoinPointGenerator generator = getJoinPointGenerator(info);
 /*  722 */     finalizeChainAndRebindJoinPoint(this.infogenerator.);
 /*      */   }
 /*      */ 
 /*      */   private JoinPointGenerator getJoinPointGenerator(JoinPointInfo info)
 /*      */   {
 /*  727 */     if ((info instanceof MethodInfo))
 /*      */     {
 /*  729 */       return getJoinPointGenerator((MethodInfo)info);
 /*      */     }
 /*  731 */     if ((info instanceof FieldInfo))
 /*      */     {
 /*  733 */       return getJoinPointGenerator((FieldInfo)info);
 /*      */     }
 /*  735 */     if ((info instanceof ConstructionInfo))
 /*      */     {
 /*  737 */       return getJoinPointGenerator((ConstructionInfo)info);
 /*      */     }
 /*  739 */     if ((info instanceof ConstructorInfo))
 /*      */     {
 /*  741 */       return getJoinPointGenerator((ConstructorInfo)info);
 /*      */     }
 /*  743 */     if ((info instanceof ConByConInfo))
 /*      */     {
 /*  745 */       return getJoinPointGenerator((ConByConInfo)info);
 /*      */     }
 /*  747 */     if ((info instanceof ConByMethodInfo))
 /*      */     {
 /*  749 */       return getJoinPointGenerator((ConByMethodInfo)info);
 /*      */     }
 /*  751 */     if ((info instanceof MethodByMethodInfo))
 /*      */     {
 /*  753 */       return getJoinPointGenerator((MethodByMethodInfo)info);
 /*      */     }
 /*  755 */     if ((info instanceof MethodByConInfo))
 /*      */     {
 /*  757 */       return getJoinPointGenerator((MethodByConInfo)info);
 /*      */     }
 /*      */ 
 /*  761 */     throw new RuntimeException("Invalid JoinPointInfo passed in: " + info.getClass().getName());
 /*      */   }
 /*      */ 
 /*      */   protected MethodJoinPointGenerator getJoinPointGenerator(MethodInfo info)
 /*      */   {
 /*  767 */     return this..getJoinPointGenerator(info);
 /*      */   }
 /*      */ 
 /*      */   protected FieldJoinPointGenerator getJoinPointGenerator(FieldInfo info)
 /*      */   {
 /*  772 */     return this..getJoinPointGenerator(info);
 /*      */   }
 /*      */ 
 /*      */   {
 /*  777 */     return this..getJoinPointGenerator(info);
 /*      */   }
 /*      */ 
 /*      */   {
 /*  782 */     return this..getJoinPointGenerator(info);
 /*      */   }
 /*      */ 
 /*      */   {
 /*  787 */     return this..getJoinPointGenerator(info);
 /*      */   }
 /*      */ 
 /*      */   {
 /*  792 */     return this..getJoinPointGenerator(info);
 /*      */   }
 /*      */ 
 /*      */   protected ConByConJoinPointGenerator getJoinPointGenerator(ConByConInfo info)
 /*      */   {
 /*  797 */     return this..getJoinPointGenerator(info);
 /*      */   }
 /*      */ 
 /*      */   {
 /*  802 */     return this..getJoinPointGenerator(info);
 /*      */   }
 /*      */ 
 /*      */   protected void pointcutResolved(JoinPointInfo infoAdviceBinding bindingJoinpoint joinpoint)
 /*      */   {
 /*  812 */     ArrayList curr = info.getInterceptorChain();
 /*  813 */     if (binding.getCFlow() != null)
 /*      */     {
 /*  816 */       InterceptorFactory[] factories = binding.getInterceptorFactories();
 /*  817 */       for (int i = 0; i < factories.lengthi++)
 /*      */       {
 /*  819 */         curr.add(new GeneratedAdvisorInterceptor(factories[i], thisjoinpointbinding.getCFlowString(), binding.getCFlow()));
 /*      */       }
 /*      */     }
 /*      */     else
 /*      */     {
 /*  824 */       InterceptorFactory[] factories = binding.getInterceptorFactories();
 /*  825 */       for (int i = 0; i < factories.lengthi++)
 /*      */       {
 /*  827 */         curr.add(new GeneratedAdvisorInterceptor(factories[i], thisjoinpoint));
 /*      */       }
 /*      */     }
 /*      */   }
 /*      */ 
 /*      */   private void finalizeChainAndRebindJoinPoint(Map oldInfosJoinPointInfo infoJoinPointGenerator generatorOldInfoMaps oldInfoMapInstance)
 /*      */   {
 /*  834 */     ArrayList list = info.getInterceptorChain();
 /*  835 */     GeneratedAdvisorInterceptor[] factories = null;
 /*  836 */     if (list.size() > 0)
 /*      */     {
 /*  838 */       factories = applyPrecedence((GeneratedAdvisorInterceptor[])(GeneratedAdvisorInterceptor[])list.toArray(new GeneratedAdvisorInterceptor[list.size()]));
 /*      */     }
 /*  840 */     info.setInterceptors(factories);
 /*      */ 
 /*  842 */     if (updateOldInfo(oldInfosinfooldInfoMapInstance))
 /*      */     {
 /*  844 */       generator.rebindJoinpoint(info);
 /*      */     }
 /*      */   }
 /*      */ 
 /*      */   public String toString()
 /*      */   {
 /*  851 */     Class clazz = getClass();
 /*  852 */     StringBuffer sb = new StringBuffer("CLASS: " + clazz.getName());
 /*      */ 
 /*  854 */     Field[] fields = clazz.getFields();
 /*  855 */     for (int i = 0; i < fields.lengthi++)
 /*      */     {
 /*  857 */       sb.append("\n\t" + fields[i]);
 /*      */     }
 /*  859 */     return sb.toString();
 /*      */   }
 /*      */ 
 /*      */   {
 /*  864 */     return PrecedenceSorter.applyPrecedence(interceptorsthis.);
 /*      */   }
 /*      */ 
 /*      */   public Object getPerClassAspect(AspectDefinition def)
 /*      */   {
 /*  874 */     return this..getPerClassAspect(def);
 /*      */   }
 /*      */ 
 /*      */   public Object getPerClassJoinpointAspect(AspectDefinition defJoinpoint joinpoint)
 /*      */   {
 /*  886 */     return this..getPerClassJoinpointAspect(defjoinpoint);
 /*      */   }
 /*      */ 
 /*      */   public synchronized void addPerClassJoinpointAspect(AspectDefinition defJoinpoint joinpoint)
 /*      */   {
 /*  891 */     Map joinpoints = (Map)this..get(def);
 /*  892 */     if (joinpoints == null)
 /*      */     {
 /*  894 */       joinpoints = new ConcurrentHashMap();
 /*  895 */       this..put(defjoinpoints);
 /*      */     }
 /*      */ 
 /*  898 */     if (joinpoints.get(joinpoint) == null)
 /*      */     {
 /*  900 */       joinpoints.put(joinpointdef.getFactory().createPerJoinpoint(thisjoinpoint));
 /*      */     }
 /*  902 */     def.registerAdvisor(this);
 /*      */   }
 /*      */ 
 /*      */   public synchronized void removePerClassJoinpointAspect(AspectDefinition def)
 /*      */   {
 /*  907 */     this..remove(def);
 /*      */   }
 /*      */ 
 /*      */   public boolean chainOverridingForInheritedMethods()
 /*      */   {
 /*  916 */     return true;
 /*      */   }
 /*      */ 
 /*      */   public Object getFieldAspect(FieldJoinpoint joinpointAspectDefinition def)
 /*      */   {
 /*  922 */     Object instance = getPerClassJoinpointAspect(defjoinpoint);
 /*  923 */     if (instance == null)
 /*      */     {
 /*  925 */       addPerClassJoinpointAspect(defjoinpoint);
 /*  926 */       instance = getPerClassJoinpointAspect(defjoinpoint);
 /*      */     }
 /*  928 */     return instance;
 /*      */   }
 /*      */ 
 /*      */   {
 /*      */   }
 /*      */ 
 /*      */   protected void createMethodTables()
 /*      */     throws Exception
 /*      */   {
 /*  943 */     this..createMethodTables();
 /*      */   }
 /*      */ 
 /*      */   protected void createFieldTable()
 /*      */     throws Exception
 /*      */   {
 /*  953 */     this..createFieldTable();
 /*      */   }
 /*      */ 
 /*      */   protected void createConstructorTables()
 /*      */     throws Exception
 /*      */   {
 /*  963 */     this..createConstructorTables();
 /*      */   }
 /*      */ 
 /*      */   public Set getPerInstanceAspectDefinitions()
 /*      */   {
 /*  969 */     return this..getPerInstanceAspectDefinitions();
 /*      */   }
 /*      */ 
 /*      */   public Map getPerInstanceJoinpointAspectDefinitions()
 /*      */   {
 /*  975 */     return this..getPerInstanceJoinpointAspectDefinitions();
 /*      */   }
 /*      */ 
 /*      */   private boolean updateOldInfo(Map oldInfosJoinPointInfo newInfoOldInfoMaps oldInfoMapInstance)
 /*      */   {
 /*  983 */     JoinPointInfo oldInfo = (JoinPointInfo)oldInfos.get(newInfo.getJoinpoint());
 /*  984 */     if (oldInfo != null)
 /*      */     {
 /*  987 */       if (oldInfo.equalChains(newInfo))
 /*      */       {
 /*  989 */         return false;
 /*      */       }
 /*      */     }
 /*  992 */     oldInfo = newInfo.copy();
 /*      */ 
 /*  994 */     if (oldInfoMapInstance == .)
 /*      */     {
 /*  996 */       oldInfos = initOldInfosMap();
 /*      */     }
 /*  998 */     else if (oldInfoMapInstance == .)
 /*      */     {
 /* 1000 */       oldInfos = initOldFieldReadInfosMap();
 /*      */     }
 /* 1002 */     else if (oldInfoMapInstance == .)
 /*      */     {
 /* 1004 */       oldInfos = initOldConstructionInfosMap();
 /*      */     }
 /*      */     else
 /*      */     {
 /* 1008 */       throw new RuntimeException("Unrecognised map");
 /*      */     }
 /*      */ 
 /* 1011 */     oldInfos.put(newInfo.getJoinpoint(), oldInfo);
 /* 1012 */     return true;
 /*      */   }
 /*      */ 
 /*      */   protected void generateJoinPointClass(MethodInfo info)
 /*      */   {
 /* 1017 */     MethodJoinPointGenerator generator = getJoinPointGenerator(info);
 /* 1018 */     generator.generateJoinPointClass(getClass().getClassLoader(), info);
 /*      */   }
 /*      */ 
 /*      */   protected void generateJoinPointClass(FieldInfo info)
 /*      */   {
 /* 1023 */     FieldJoinPointGenerator generator = getJoinPointGenerator(info);
 /* 1024 */     generator.generateJoinPointClass(getClass().getClassLoader(), info);
 /*      */   }
 /*      */ 
 /*      */   protected void generateJoinPointClass(ConstructorInfo info)
 /*      */   {
 /* 1029 */     ConstructorJoinPointGenerator generator = getJoinPointGenerator(info);
 /* 1030 */     generator.generateJoinPointClass(getClass().getClassLoader(), info);
 /*      */   }
 /*      */ 
 /*      */   protected void generateJoinPointClass(ConstructionInfo info)
 /*      */   {
 /* 1035 */     ConstructionJoinPointGenerator generator = getJoinPointGenerator(info);
 /* 1036 */     generator.generateJoinPointClass(getClass().getClassLoader(), info);
 /*      */   }
 /*      */ 
 /*      */   protected void generateJoinPointClass(MethodByMethodInfo info)
 /*      */   {
 /* 1041 */     MethodByMethodJoinPointGenerator generator = getJoinPointGenerator(info);
 /* 1042 */     generator.generateJoinPointClass(getClass().getClassLoader(), info);
 /*      */   }
 /*      */ 
 /*      */   protected void generateJoinPointClass(ConByMethodInfo info)
 /*      */   {
 /* 1047 */     ConByMethodJoinPointGenerator generator = getJoinPointGenerator(info);
 /* 1048 */     generator.generateJoinPointClass(getClass().getClassLoader(), info);
 /*      */   }
 /*      */ 
 /*      */   protected void generateJoinPointClass(ConByConInfo info)
 /*      */   {
 /* 1053 */     ConByConJoinPointGenerator generator = getJoinPointGenerator(info);
 /* 1054 */     generator.generateJoinPointClass(getClass().getClassLoader(), info);
 /*      */   }
 /*      */ 
 /*      */   protected void generateJoinPointClass(MethodByConInfo info)
 /*      */   {
 /* 1059 */     MethodByConJoinPointGenerator generator = getJoinPointGenerator(info);
 /* 1060 */     generator.generateJoinPointClass(getClass().getClassLoader(), info);
 /*      */   }
 /*      */ 
 /*      */   protected Object rebindJoinPointWithInstanceInformation(JoinPointInfo info)
 /*      */   {
 /* 1065 */     JoinPointGenerator generator = getJoinPointGenerator(info);
 /* 1066 */     generator.rebindJoinpoint(info);
 /* 1067 */     return generator.generateJoinPointClass(getClass().getClassLoader(), info);
 /*      */   }
 /*      */ 
 /*      */   public Object createAndRebindJoinPointForInstance(JoinPointInfo info)
 /*      */   {
 /* 1075 */     JoinPointInfo newinfo = info.copy();
 /* 1076 */     newinfo.setAdvisor(this);
 /* 1077 */     return rebindJoinPointWithInstanceInformation(newinfo);
 /*      */   }
 /*      */ 
 /*      */   protected void initJoinPointGeneratorsMap()
 /*      */   {
 /*      */     {
 /* 1085 */       lockWrite();
 /*      */       try
 /*      */       {
 /* 1088 */         if (this. == .)
 /*      */         {
 /* 1090 */           this. = new ConcurrentHashMap();
 /*      */         }
 /*      */       }
 /*      */       finally
 /*      */       {
 /* 1095 */         unlockWrite();
 /*      */       }
 /*      */     }
 /*      */   }
 /*      */ 
 /*      */   protected void initFieldReadJoinPointGeneratorsMap()
 /*      */   {
 /*      */     {
 /* 1104 */       lockWrite();
 /*      */       try
 /*      */       {
 /*      */         {
 /* 1109 */           this. = new ConcurrentHashMap();
 /*      */         }
 /*      */       }
 /*      */       finally
 /*      */       {
 /* 1114 */         unlockWrite();
 /*      */       }
 /*      */     }
 /*      */   }
 /*      */ 
 /*      */   protected void initConstructionJoinPointGeneratorsMap()
 /*      */   {
 /*      */     {
 /* 1123 */       lockWrite();
 /*      */       try
 /*      */       {
 /*      */         {
 /* 1128 */           this. = new ConcurrentHashMap();
 /*      */         }
 /*      */       }
 /*      */       finally
 /*      */       {
 /* 1133 */         unlockWrite();
 /*      */       }
 /*      */     }
 /*      */   }
 /*      */ 
 /*      */   protected ConcurrentHashMap initOldInfosMap()
 /*      */   {
 /* 1140 */     if (this. == .