Package org.jboss.aop.introduction

Examples of org.jboss.aop.introduction.InterfaceIntroduction$Mixin


/* 1729 */     if ((interfaceIntroductions != null) && (interfaceIntroductions.size() > 0))
/*      */     {
/* 1731 */       Iterator it = interfaceIntroductions.values().iterator();
/* 1732 */       while (it.hasNext())
/*      */       {
/* 1734 */         InterfaceIntroduction pointcut = (InterfaceIntroduction)it.next();
/* 1735 */         if (pointcut.matches(advisor, clazz))
/*      */         {
/* 1737 */           pointcut.addAdvisor(advisor);
/*      */         }
/*      */       }
/*      */     }
/*      */   }
View Full Code Here


/* 1746 */     if ((interfaceIntroductions != null) && (interfaceIntroductions.size() > 0))
/*      */     {
/* 1748 */       Iterator it = interfaceIntroductions.values().iterator();
/* 1749 */       while (it.hasNext())
/*      */       {
/* 1751 */         InterfaceIntroduction pointcut = (InterfaceIntroduction)it.next();
/* 1752 */         if (pointcut.matches(advisor, clazz))
/*      */         {
/* 1754 */           pointcut.addAdvisor(advisor);
/*      */         }
/*      */       }
/*      */     }
/*      */   }
View Full Code Here

/* 196 */         ClassLoader tcl = Thread.currentThread().getContextClassLoader();
/* 197 */         pool = advisor.getManager().findClassPool(tcl);
/* 198 */         doneClasses = new HashSet();
/* 199 */         for (it = intros.iterator(); it.hasNext(); )
/*     */         {
/* 201 */           InterfaceIntroduction intro = (InterfaceIntroduction)it.next();
/* 202 */           String[] ifs = intro.getInterfaces();
/* 203 */           for (int i = 0; (ifs != null) && (i < ifs.length); i++)
/*     */           {
/* 205 */             if (doneClasses.contains(ifs[i]))
/*     */               continue;
/* 207 */             doneClasses.add(ifs[i]);
/* 208 */             if (methodExistsInSuperClassOrInterface(pool, hash, target, ifs[i], exactSuper)) return true;
/*     */
/*     */           }
/*     */
/* 212 */           ArrayList mixins = intro.getMixins();
/* 213 */           if ((mixins != null) && (mixins.size() > 0))
/*     */           {
/* 215 */             for (mit = mixins.iterator(); mit.hasNext(); )
/*     */             {
/* 217 */               InterfaceIntroduction.Mixin mixin = (InterfaceIntroduction.Mixin)mit.next();
View Full Code Here

/* 369 */         ArrayList intros = advisor.getInterfaceIntroductions();
/* 370 */         if (intros.size() > 0)
/*     */         {
/* 372 */           for (itIntro = intros.iterator(); itIntro.hasNext(); )
/*     */           {
/* 374 */             InterfaceIntroduction intro = (InterfaceIntroduction)itIntro.next();
/* 375 */             String[] introductions = intro.getInterfaces();
/* 376 */             if (introductions != null)
/*     */             {
/* 378 */               for (int i = 0; i < introductions.length; i++)
/*     */               {
/* 380 */                 Class iface = cl.loadClass(introductions[i]);
/* 381 */                 if (subtypeOf(iface, instanceOf, advisor)) return true;
/*     */               }
/*     */             }
/* 384 */             ArrayList mixins = intro.getMixins();
/* 385 */             if (mixins.size() > 0)
/*     */             {
/* 387 */               for (itMixin = mixins.iterator(); itMixin.hasNext(); )
/*     */               {
/* 389 */                 InterfaceIntroduction.Mixin mixin = (InterfaceIntroduction.Mixin)itMixin.next();
View Full Code Here

/*      */   {
/*  378 */     ArrayList pointcuts = getInterfaceIntroductions();
/*  379 */     Iterator it = pointcuts.iterator();
/*  380 */     while (it.hasNext())
/*      */     {
/*  382 */       InterfaceIntroduction pointcut = (InterfaceIntroduction)it.next();
/*  383 */       ArrayList mixins = pointcut.getMixins();
/*  384 */       for (int i = 0; i < mixins.size(); i++)
/*      */       {
/*  386 */         InterfaceIntroduction.Mixin mixin = (InterfaceIntroduction.Mixin)mixins.get(i);
/*      */
/*  388 */         ClassLoader cl = SecurityActions.getContextClassLoader();
View Full Code Here

/*  56 */         ArrayList intros = advisor.getInterfaceIntroductions();
/*  57 */         if (intros.size() > 0)
/*     */         {
/*  59 */           for (itIntro = intros.iterator(); itIntro.hasNext(); )
/*     */           {
/*  61 */             InterfaceIntroduction intro = (InterfaceIntroduction)itIntro.next();
/*  62 */             String[] introductions = intro.getInterfaces();
/*  63 */             if (introductions != null)
/*     */             {
/*  65 */               for (int i = 0; i < introductions.length; i++)
/*     */               {
/*  67 */                 Class iface = cl.loadClass(introductions[i]);
/*  68 */                 if (subtypeOf(iface, instanceOf, advisor)) return true;
/*     */               }
/*     */             }
/*  71 */             ArrayList mixins = intro.getMixins();
/*  72 */             if (mixins.size() > 0)
/*     */             {
/*  74 */               for (itMixin = mixins.iterator(); itMixin.hasNext(); )
/*     */               {
/*  76 */                 InterfaceIntroduction.Mixin mixin = (InterfaceIntroduction.Mixin)itMixin.next();
View Full Code Here

/* 107 */         this.advisedMethods.put(hash, method);
/*     */       }
/*     */       Iterator it;
/* 111 */       for (int i = 0; i < this.interfaceIntroductions.size(); i++)
/*     */       {
/* 113 */         InterfaceIntroduction ii = (InterfaceIntroduction)this.interfaceIntroductions.get(i);
/* 114 */         String[] intf = ii.getInterfaces();
/* 115 */         addMethodsFromInterfaces(intf);
/*     */
/* 117 */         ArrayList mixins = ii.getMixins();
/* 118 */         if (mixins.size() <= 0)
/*     */           continue;
/* 120 */         for (it = mixins.iterator(); it.hasNext(); )
/*     */         {
/* 122 */           InterfaceIntroduction.Mixin mixin = (InterfaceIntroduction.Mixin)it.next();
View Full Code Here

/*  858 */         if (!intf.equals("")) interfaces.add(intf);
/*      */       }
/*  860 */       ifaces = (String[])interfaces.toArray(new String[interfaces.size()]);
/*      */     }
/*      */
/*  863 */     InterfaceIntroduction pcut = null;
/*  864 */     if (classExpr != null)
/*      */     {
/*  866 */       pcut = new InterfaceIntroduction(name, classExpr, ifaces);
/*      */     }
/*      */     else
/*      */     {
/*  870 */       ASTStart start = new TypeExpressionParser(new StringReader(ast)).Start();
/*  871 */       pcut = new InterfaceIntroduction(name, start, ifaces);
/*      */     }
/*  873 */     Iterator it = XmlHelper.getChildrenByTagName(pointcut, "mixin");
/*  874 */     while (it.hasNext())
/*      */     {
/*  876 */       Element mixin = (Element)it.next();
/*  877 */       if (mixin != null)
/*      */       {
/*  879 */         String construction = XmlHelper.getOptionalChildContent(mixin, "construction");
/*  880 */         String classname = XmlHelper.getUniqueChildContent(mixin, "class");
/*  881 */         String isTransientString = mixin.getAttribute("transient");
/*  882 */         boolean isTransient = true;
/*  883 */         if ((isTransientString == null) || (isTransientString.trim().equals("")))
/*      */         {
/*  885 */           isTransient = true;
/*      */         }
/*      */         else
/*      */         {
/*  889 */           isTransient = new Boolean(isTransientString).booleanValue();
/*      */         }
/*      */
/*  892 */         intfs = XmlHelper.getUniqueChildContent(mixin, "interfaces");
/*  893 */         StringTokenizer tokenizer = new StringTokenizer(intfs, ",");
/*  894 */         ArrayList interfaces = new ArrayList();
/*  895 */         while (tokenizer.hasMoreTokens())
/*      */         {
/*  897 */           String intf = tokenizer.nextToken().trim();
/*  898 */           if (!intf.equals("")) interfaces.add(intf);
/*      */         }
/*  900 */         ifaces = (String[])interfaces.toArray(new String[interfaces.size()]);
/*  901 */         pcut.getMixins().add(new InterfaceIntroduction.Mixin(classname, ifaces, construction, isTransient));
/*      */       }
/*      */     }
/*  904 */     this.manager.addInterfaceIntroduction(pcut);
/*      */   }
View Full Code Here

/* 215 */     if (proxiedClass == null)
/*     */     {
/* 217 */       proxiedClass = Object.class;
/*     */     }
/* 219 */     String[] introducedNames = getClassNames(this.interfaces);
/* 220 */     InterfaceIntroduction intro = new InterfaceIntroduction("Introduction" + counter++, proxiedClass.getName(), introducedNames);
/*     */
/* 222 */     if (mixinLength > 0)
/*     */     {
/* 224 */       addMixins(intro);
/*     */     }
View Full Code Here

/*     */
/*     */   private void initInstanceContainer()
/*     */   {
/* 269 */     if (requiresInstanceAdvisor())
/*     */     {
/* 271 */       InterfaceIntroduction introduction = null;
/* 272 */       if ((hasInterfaceIntroductions()) || (hasMixins()))
/*     */       {
/* 274 */         introduction = getInterfaceIntroduction();
/*     */       }
/*     */
View Full Code Here

TOP

Related Classes of org.jboss.aop.introduction.InterfaceIntroduction$Mixin

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.