Package org.jboss.beans.metadata.plugins

Examples of org.jboss.beans.metadata.plugins.AbstractListMetaData


      precedence.setName(name);
      BeanMetaDataUtil.setSimpleProperty(precedence, "name", getName());
      util.setAspectManagerProperty(precedence, "manager");
      result.add(precedence);
     
      AbstractListMetaData lmd = new AbstractListMetaData();
      lmd.setType(ArrayList.class.getName());
      BeanMetaDataUtil.setSimpleProperty(precedence, "entries", lmd);
      int i = 0;
      for (BaseInterceptorData entry : entries)
      {
         String entryName = name + "$" + i++;
         AbstractBeanMetaData entryBean = new AbstractBeanMetaData(PrecedenceDefEntry.class.getName());
         entryBean.setName(entryName);
         BeanMetaDataUtil.setSimpleProperty(entryBean, "aspectName", entry.getRefName());
         if (entry instanceof AdviceData)
         {
            BeanMetaDataUtil.setSimpleProperty(entryBean, "aspectMethod", ((AdviceData)entry).getAdviceMethod());
         }
         lmd.add(new AbstractInjectionValueMetaData(entryName));
         result.add(entryBean);
      }

      return result;
   }
View Full Code Here


      util.setAspectManagerProperty(binding, "manager");
      result.add(binding);
     
      if (interceptors.size() > 0)
      {
         AbstractListMetaData almd = new AbstractListMetaData();
         int i = 0;
         for (BaseInterceptorData interceptor : interceptors)
         {
            AbstractBeanMetaData bmd = new AbstractBeanMetaData(interceptor.getBeanClassName());
            String intName = name + "$" + i++;
            bmd.setName(intName);
            util.setAspectManagerProperty(bmd, "manager");
            BeanMetaDataUtil.DependencyBuilder builder = new BeanMetaDataUtil.DependencyBuilder(bmd, "binding", name).setState("Instantiated");
            BeanMetaDataUtil.setDependencyProperty(builder);
           
            if (interceptor instanceof AdviceData)
            {
               BeanMetaDataUtil.DependencyBuilder db = new BeanMetaDataUtil.DependencyBuilder(bmd, "aspect", interceptor.getRefName());
               BeanMetaDataUtil.setDependencyProperty(db);
               if (((AdviceData)interceptor).getAdviceMethod() != null)
               {
                  BeanMetaDataUtil.setSimpleProperty(bmd, "aspectMethod", ((AdviceData)interceptor).getAdviceMethod());
               }
               BeanMetaDataUtil.setSimpleProperty(bmd, "type", ((AdviceData)interceptor).getType());
            }
            else
            {
               BeanMetaDataUtil.DependencyBuilder db = new BeanMetaDataUtil.DependencyBuilder(bmd, "stack", interceptor.getRefName());
               BeanMetaDataUtil.setDependencyProperty(db);
            }
            result.add(bmd);
            almd.add(new AbstractInjectionValueMetaData(intName));
            BeanMetaDataUtil.setSimpleProperty(binding, "advices", almd);
         }        
      }
     
      return result;
View Full Code Here

      util.setAspectManagerProperty(binding, "manager");
      result.add(binding);
     
      if (interceptors.size() > 0)
      {
         AbstractListMetaData almd = new AbstractListMetaData();
         int i = 0;
         for (BaseInterceptorData interceptor : interceptors)
         {
            AbstractBeanMetaData bmd = new AbstractBeanMetaData(interceptor.getBeanClassName());
            String intName = name + "$" + i++;
            bmd.setName(intName);
            util.setAspectManagerProperty(bmd, "manager");
            BeanMetaDataUtil.DependencyBuilder builder = new BeanMetaDataUtil.DependencyBuilder(bmd, "binding", name).setState("Instantiated");
            BeanMetaDataUtil.setDependencyProperty(builder);
           
            if (interceptor instanceof AdviceData)
            {
               BeanMetaDataUtil.DependencyBuilder db = new BeanMetaDataUtil.DependencyBuilder(bmd, "aspect", interceptor.getRefName());
               BeanMetaDataUtil.setDependencyProperty(db);
               if (((AdviceData)interceptor).getAdviceMethod() != null)
               {
                  BeanMetaDataUtil.setSimpleProperty(bmd, "aspectMethod", ((AdviceData)interceptor).getAdviceMethod());
               }
               BeanMetaDataUtil.setSimpleProperty(bmd, "type", ((AdviceData)interceptor).getType());
            }
            else
            {
               BeanMetaDataUtil.DependencyBuilder db = new BeanMetaDataUtil.DependencyBuilder(bmd, "stack", interceptor.getRefName());
               BeanMetaDataUtil.setDependencyProperty(db);
            }
            result.add(bmd);
            almd.add(new AbstractInjectionValueMetaData(intName));
            BeanMetaDataUtil.setSimpleProperty(binding, "advices", almd);
         }        
      }
     
      return result;
View Full Code Here

      return result;
   }
  
   public static void addInterfaces(AbstractBeanMetaData introduction, String propertyName, String interfaces)
   {
      AbstractListMetaData lmd = new AbstractListMetaData();
      lmd.setType(ArrayList.class.getName());
      lmd.setElementType(String.class.getName());
      BeanMetaDataUtil.setSimpleProperty(introduction, propertyName, lmd);
     
      StringTokenizer tok = new StringTokenizer(interfaces, ",");
      while (tok.hasMoreTokens())
      {
         String token = tok.nextToken();
         lmd.add(new StringValueMetaData(token.trim()));
      }
   }
View Full Code Here

      }
   }
  
   private void addMixins(AbstractBeanMetaData introduction, List<BeanMetaData> result)
   {
      AbstractListMetaData lmd = new AbstractListMetaData();
      lmd.setType(ArrayList.class.getName());
      BeanMetaDataUtil.setSimpleProperty(introduction, "mixins", lmd);
      int i = 0;
      for (AbstractBeanMetaData mixin : mixins)
      {
         String name = introduction.getName() + "$" + i++;
         mixin.setName(name);
         result.add(mixin);

         lmd.add(new AbstractInjectionValueMetaData(name));
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.beans.metadata.plugins.AbstractListMetaData

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.