Package org.jboss.aop.introduction

Examples of org.jboss.aop.introduction.InterfaceIntroduction


    */
   public void removeInterfaceIntroduction(String name)
   {
      synchronized (interfaceIntroductions)
      {
         InterfaceIntroduction pointcut = interfaceIntroductions.remove(name);
         if (pointcut == null) return;
         pointcut.clearAdvisors();
      }
   }
View Full Code Here


      loader.getAspectManager().removeCFlowStack(name);
   }
  
   public void deployInterfaceIntroduction(AspectAnnotationLoader loader, AspectAnnotationLoaderStrategy.InterfaceIntroductionInfo introduction) throws Exception
   {
      InterfaceIntroduction intro = null;
      if (introduction.getTarget() != null)
      {
         intro = new InterfaceIntroduction(introduction.getName(), introduction.getTarget(), introduction.getInterfaces(), introduction.getConstructorClass(), introduction.getConstructorMethod());
      }
      else
      {
         ASTStart start = new TypeExpressionParser(new StringReader(introduction.getExpr())).Start();
         intro = new InterfaceIntroduction(introduction.getName(), start, introduction.getInterfaces(), introduction.getConstructorClass(), introduction.getConstructorMethod());
      }

      if (introduction.getMixins() != null)
      {
         for (AspectAnnotationLoaderStrategy.InterfaceIntroductionMixinInfo mixin : introduction.getMixins())
         {
            intro.getMixins().add(new InterfaceIntroduction.Mixin(mixin.getClassname(), mixin.getInterfaces(), mixin.getConstruction(), mixin.isTrans()));
         }
      }
     
      loader.getAspectManager().addInterfaceIntroduction(intro);
   }
View Full Code Here

      lock.lockWrite();
      try
      {
         synchronized (interfaceIntroductions)
         {
            InterfaceIntroduction pointcut = interfaceIntroductions.remove(name);
            if (pointcut == null) return;
            pointcut.clearAdvisors();
         }
      }
      finally
      {
         lock.unlockWrite();
View Full Code Here

      if (proxiedClass == null)
      {
         proxiedClass = Object.class;
      }
      String[] introducedNames = getClassNames(interfaces);
      InterfaceIntroduction intro = new InterfaceIntroduction("Introduction" + counter++, proxiedClass.getName(), introducedNames);

      if (mixinLength > 0)
      {
         addMixins(intro);
      }
View Full Code Here

   private void initInstanceContainer()
   {
      if (requiresInstanceAdvisor())
      {
         InterfaceIntroduction introduction = null;
         if (hasInterfaceIntroductions() || hasMixins())
         {
            introduction = getInterfaceIntroduction();
         }
View Full Code Here

         indenter(pw, indent);
         pw.println("<introductions>");
         indent++;
         for (int i = 0; i < introductions.size(); i++)
         {
            InterfaceIntroduction pointcut = introductions.get(i);
            indenter(pw, indent);
            pw.println("<introduction classExpr=\"" + pointcut.getClassExpr() + "\">");
            indent++;
            String[] intfs = pointcut.getInterfaces();
            ArrayList<InterfaceIntroduction.Mixin> mixins = pointcut.getMixins();

            if (intfs != null && intfs.length > 0)
            {
               //Show interfaces
               for (int j = 0; j < intfs.length; j++)
View Full Code Here

      Iterator<InterfaceIntroduction> it = pointcuts.iterator();
      if (it.hasNext()) setupBasics(clazz);
      while (it.hasNext())
      {

         InterfaceIntroduction pointcut = it.next();
         ArrayList<InterfaceIntroduction.Mixin> mixins = pointcut.getMixins();
         for (InterfaceIntroduction.Mixin mixin: mixins)
         {
            addMixin(clazz, pointcut, mixin, baseMethods);
         }
      }

      // pointcut interfaces.  If a method is already implemented for it then use that method
      // otherwise delegate to an interceptor
      it = pointcuts.iterator();
      while (it.hasNext())
      {
         InterfaceIntroduction pointcut = it.next();
         String[] interfaces = pointcut.getInterfaces();
         if (interfaces == null) continue;
         for (int i = 0; i < interfaces.length; i++)
         {
            addIntroductionPointcutInterface(clazz, advisor, interfaces[i], baseMethods);
         }
View Full Code Here

    */
   public void removeInterfaceIntroduction(String name)
   {
      synchronized (interfaceIntroductions)
      {
         InterfaceIntroduction pointcut = interfaceIntroductions.remove(name);
         if (pointcut == null) return;
         pointcut.clearAdvisors();
      }
   }
View Full Code Here

/* 151 */     if ((this.interfaces == null) && (this.mixins == null)) {
/* 152 */       throw new IllegalArgumentException("Neither interfaces nor mixins set");
/*     */     }
/* 154 */     String[] intfs = this.interfaces != null ? (String[])this.interfaces.toArray(new String[this.interfaces.size()]) : null;
/*     */
/* 156 */     InterfaceIntroduction introduction = null;
/* 157 */     if (this.classes != null)
/*     */     {
/* 159 */       introduction = new InterfaceIntroduction(this.name, this.classes, intfs);
/*     */     }
/*     */     else
/*     */     {
/* 163 */       ASTStart start = new TypeExpressionParser(new StringReader(this.expr)).Start();
/* 164 */       introduction = new InterfaceIntroduction(this.name, start, intfs);
/*     */     }
/*     */
/* 167 */     if (this.mixins != null)
/*     */     {
/* 169 */       for (MixinEntry entry : this.mixins)
/*     */       {
/* 171 */         if (entry.getInterfaces() == null)
/* 172 */           throw new IllegalArgumentException("MixinEntry with null interfaces");
/* 173 */         if (entry.getMixin() == null)
/* 174 */           throw new IllegalArgumentException("MixinEntry with null mixin");
/* 175 */         String[] intfaces = (String[])entry.getInterfaces().toArray(new String[entry.getInterfaces().size()]);
/*     */
/* 177 */         introduction.addMixin(new InterfaceIntroduction.Mixin(entry.getMixin(), intfaces, entry.getConstruction(), entry.isTransient()));
/*     */       }
/*     */     }
/* 180 */     this.manager.addInterfaceIntroduction(introduction);
/*     */   }
View Full Code Here

/*      */
/*      */   public void removeInterfaceIntroduction(String name)
/*      */   {
/* 1579 */     synchronized (this.interfaceIntroductions)
/*      */     {
/* 1581 */       InterfaceIntroduction pointcut = (InterfaceIntroduction)this.interfaceIntroductions.remove(name);
/* 1582 */       if (pointcut == null) return;
/* 1583 */       pointcut.clearAdvisors();
/*      */     }
/*      */   }
View Full Code Here

TOP

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

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.