Examples of Populator


Examples of net.infopeers.restrant.commons.populate.Populator

    TestClass1 test1 = new TestClass1();
    test1.setIntValue(111);

    TestClass2 test2 = new TestClass2();

    Populator populator = createPopulator();

    populator.populate(test1, test2);

    assertEquals(111, test2.getIntValue());
  }
View Full Code Here

Examples of net.infopeers.restrant.commons.populate.Populator

    test1.setTestObjectArray2linkedList(test1Array);
   
    TestClass2 test2 = new TestClass2();
   

    Populator populator = createPopulator();
    populator.populate(test1, test2);

    LinkedList list = test2.getTestObjectArray2linkedList();
    assertEquals(3, list.size());
    Utils.validate(this, (TestClass2) list.get(0));
    Utils.validate(this, (TestClass2) list.get(1));
View Full Code Here

Examples of net.infopeers.restrant.commons.populate.Populator

      list.add(innner);
      test2.setTestObjectArray2linkedList(list);
    }
   

    Populator populator = createPopulator();
    populator.populate(test1, test2);

    LinkedList list = test2.getTestObjectArray2linkedList();
    assertEquals(3, list.size());
    assertEquals(innner, list.get(0)); //�I�u�W�F�N�g�͒u���������Ă��Ȃ��B
    Utils.validate(this, (TestClass2) list.get(0));
View Full Code Here

Examples of net.infopeers.restrant.commons.populate.Populator

 
 
  private Populator createPopulator() {
    DefaultPopulatorBuilder builder = new DefaultPopulatorBuilder();
    builder.addBean2Bean(TestClass1.class, TestClass2.class);
    Populator populator = builder.create();
    return populator;
  }
View Full Code Here

Examples of org.glassfish.hk2.api.Populator

     */
    public static ServiceLocator createAndPopulateServiceLocator(String name) throws MultiException {
        ServiceLocator retVal = ServiceLocatorFactory.getInstance().create(name);
       
        DynamicConfigurationService dcs = retVal.getService(DynamicConfigurationService.class);
        Populator populator = dcs.getPopulator();
       
        try {
            populator.populate();
        }
        catch (IOException e) {
            throw new MultiException(e);
        }
       
View Full Code Here

Examples of org.glassfish.hk2.api.Populator

     */
    public static ServiceLocator createAndPopulateServiceLocator(String name) throws MultiException {
        ServiceLocator retVal = ServiceLocatorFactory.getInstance().create(name);
       
        DynamicConfigurationService dcs = retVal.getService(DynamicConfigurationService.class);
        Populator populator = dcs.getPopulator();
       
        try {
            populator.populate();
        }
        catch (IOException e) {
            throw new MultiException(e);
        }
       
View Full Code Here

Examples of org.glassfish.hk2.api.Populator

     */
    public static ServiceLocator createAndPopulateServiceLocator(String name) throws MultiException {
        ServiceLocator retVal = ServiceLocatorFactory.getInstance().create(name);
       
        DynamicConfigurationService dcs = retVal.getService(DynamicConfigurationService.class);
        Populator populator = dcs.getPopulator();
       
        try {
            populator.populate();
        }
        catch (IOException e) {
            throw new MultiException(e);
        }
       
View Full Code Here

Examples of org.glassfish.hk2.api.Populator

        if (postProcessors != null) {
          allPostProcessors.addAll(postProcessors);
        }

        DynamicConfigurationService dcs = serviceLocator.getService(DynamicConfigurationService.class);
        Populator populator = dcs.getPopulator();
       
      List<ActiveDescriptor<?>> retVal = populator.populate(
                new ClasspathDescriptorFileFinder(singleClassLoader, name),
                allPostProcessors.toArray(new PopulatorPostProcessor[allPostProcessors.size()]));
     
      return (List<ActiveDescriptor>) ((List) retVal);
    }
View Full Code Here

Examples of org.glassfish.hk2.api.Populator

      DescriptorFileFinder fileFinder,
      List <? extends PopulatorPostProcessor> postProcessors) throws IOException {
      if (postProcessors == null) postProcessors = new LinkedList<PopulatorPostProcessor>();
     
      DynamicConfigurationService dcs = serviceLocator.getService(DynamicConfigurationService.class);
      Populator populator = dcs.getPopulator();
     
      List<ActiveDescriptor<?>> retVal = populator.populate(fileFinder,
              postProcessors.toArray(new PopulatorPostProcessor[postProcessors.size()]));
     
      return (List<ActiveDescriptor>) ((List) retVal);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.