Package org.jboss.beans.metadata.plugins

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


   {
      AbstractBeanMetaData metaData1 = new AbstractBeanMetaData("Name1", SimpleBeanWithLifecycle.class.getName());

      AbstractBeanMetaData metaData2 = new AbstractBeanMetaData("Name2", SimpleBeanWithLifecycle.class.getName());
      HashSet<DependencyMetaData> depends = new HashSet<DependencyMetaData>();
      depends.add(new AbstractDependencyMetaData("Name1"));
      metaData2.setDepends(depends);

      setBeanMetaDatas(new BeanMetaData[] { metaData1, metaData2 });
   }
View Full Code Here


   {
      AbstractBeanMetaData bean = unmarshalBean();
      Set<DependencyMetaData> dependencies = bean.getDepends();
      assertNotNull(dependencies);
      assertEquals(1, dependencies.size());
      AbstractDependencyMetaData dependency = (AbstractDependencyMetaData) dependencies.iterator().next();
      assertNotNull(dependency);
      return dependency;
   }
View Full Code Here

      return dependency;
   }
  
   public void testDependency() throws Exception
   {
      AbstractDependencyMetaData dependency = getDependency();
      assertEquals("Dependency", dependency.getDependency());
   }
View Full Code Here

   {
      assertNotNull(bmd);
      assertEquals(Collections.singleton((Object)"alias"), bmd.getAliases());
      assertEquals(Collections.singleton((SupplyMetaData)new AbstractSupplyMetaData("supply")), bmd.getSupplies());
      assertEquals(Collections.singleton((DemandMetaData)new AbstractDemandMetaData("demand")), bmd.getDemands());
      assertEquals(Collections.singleton((DependencyMetaData)new AbstractDependencyMetaData("depend")), bmd.getDepends());
      ConstructorMetaData cmd = bmd.getConstructor();
      assertNotNull(cmd);
      assertEquals(AnnotationTester.class.getName(), cmd.getFactoryClass());
      assertEquals("factoryMethod", cmd.getFactoryMethod());
      testInstalls(bmd.getInstalls());
View Full Code Here

   {
      AbstractBeanMetaData bean = unmarshalBean(name);
      Set<DependencyMetaData> dependencies = bean.getDepends();
      assertNotNull(dependencies);
      assertEquals(1, dependencies.size());
      AbstractDependencyMetaData dependency = (AbstractDependencyMetaData) dependencies.iterator().next();
      assertNotNull(dependency);
      return dependency;
   }
View Full Code Here

      return dependency;
   }
  
   public void testDependency() throws Exception
   {
      AbstractDependencyMetaData dependency = getDependency("Dependency.xml");
      assertEquals("Dependency", dependency.getDependency());
   }
View Full Code Here

   protected void addMetaData(AbstractBeanMetaData beanMetaData)
   {
      Set<DemandMetaData> demands = Collections.singleton((DemandMetaData)new AbstractDemandMetaData("deployer"));
      beanMetaData.setDemands(new HashSet<DemandMetaData>(demands));

      Set<DependencyMetaData> depends = Collections.singleton((DependencyMetaData)new AbstractDependencyMetaData("deployer"));
      beanMetaData.setDepends(new HashSet<DependencyMetaData>(depends));

      Set<SupplyMetaData> supplys = Collections.singleton((SupplyMetaData)new AbstractSupplyMetaData("somesupply"));
      beanMetaData.setSupplies(new HashSet<SupplyMetaData>(supplys));
   }
View Full Code Here

    * @param dependency the dependency
    * @return the dependency metadata
    */
   protected DependencyMetaData createDependencyMetaData(Object dependency)
   {
      return new AbstractDependencyMetaData(dependency);
   }
View Full Code Here

    * @param dependency the dependency
    * @return the dependency metadata
    */
   protected DependencyMetaData createDependencyMetaData(Object dependency)
   {
      return new AbstractDependencyMetaData(dependency);
   }
View Full Code Here

      if (dependencies == null)
      {
         dependencies = new HashSet<DependencyMetaData>();
         beanMetaData.setDepends(dependencies);
      }
      dependencies.add(new AbstractDependencyMetaData(dependency));
      return this;
   }
View Full Code Here

TOP

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

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.