Java Code Examples for org.springframework.beans.factory.config.ListFactoryBean#setSourceList()
The following examples show how to use
org.springframework.beans.factory.config.ListFactoryBean#setSourceList() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XmlBeanCollectionTests.java From spring-analysis-note with MIT License | 6 votes |
@Test public void testCollectionFactoryDefaults() throws Exception { ListFactoryBean listFactory = new ListFactoryBean(); listFactory.setSourceList(new LinkedList()); listFactory.afterPropertiesSet(); assertTrue(listFactory.getObject() instanceof ArrayList); SetFactoryBean setFactory = new SetFactoryBean(); setFactory.setSourceSet(new TreeSet()); setFactory.afterPropertiesSet(); assertTrue(setFactory.getObject() instanceof LinkedHashSet); MapFactoryBean mapFactory = new MapFactoryBean(); mapFactory.setSourceMap(new TreeMap()); mapFactory.afterPropertiesSet(); assertTrue(mapFactory.getObject() instanceof LinkedHashMap); }
Example 2
Source File: XmlBeanCollectionTests.java From java-technology-stack with MIT License | 6 votes |
@Test public void testCollectionFactoryDefaults() throws Exception { ListFactoryBean listFactory = new ListFactoryBean(); listFactory.setSourceList(new LinkedList()); listFactory.afterPropertiesSet(); assertTrue(listFactory.getObject() instanceof ArrayList); SetFactoryBean setFactory = new SetFactoryBean(); setFactory.setSourceSet(new TreeSet()); setFactory.afterPropertiesSet(); assertTrue(setFactory.getObject() instanceof LinkedHashSet); MapFactoryBean mapFactory = new MapFactoryBean(); mapFactory.setSourceMap(new TreeMap()); mapFactory.afterPropertiesSet(); assertTrue(mapFactory.getObject() instanceof LinkedHashMap); }
Example 3
Source File: XmlBeanCollectionTests.java From spring4-understanding with Apache License 2.0 | 6 votes |
@Test public void testCollectionFactoryDefaults() throws Exception { ListFactoryBean listFactory = new ListFactoryBean(); listFactory.setSourceList(new LinkedList()); listFactory.afterPropertiesSet(); assertTrue(listFactory.getObject() instanceof ArrayList); SetFactoryBean setFactory = new SetFactoryBean(); setFactory.setSourceSet(new TreeSet()); setFactory.afterPropertiesSet(); assertTrue(setFactory.getObject() instanceof LinkedHashSet); MapFactoryBean mapFactory = new MapFactoryBean(); mapFactory.setSourceMap(new TreeMap()); mapFactory.afterPropertiesSet(); assertTrue(mapFactory.getObject() instanceof LinkedHashMap); }
Example 4
Source File: ConfigurationClassProcessingTests.java From spring-analysis-note with MIT License | 4 votes |
public @Bean FactoryBean<?> factoryBean() { ListFactoryBean fb = new ListFactoryBean(); fb.setSourceList(Arrays.asList("element1", "element2")); return fb; }
Example 5
Source File: ConfigurationClassProcessingTests.java From java-technology-stack with MIT License | 4 votes |
public @Bean FactoryBean<?> factoryBean() { ListFactoryBean fb = new ListFactoryBean(); fb.setSourceList(Arrays.asList("element1", "element2")); return fb; }
Example 6
Source File: ConfigurationClassProcessingTests.java From spring4-understanding with Apache License 2.0 | 4 votes |
public @Bean FactoryBean<?> factoryBean() { ListFactoryBean fb = new ListFactoryBean(); fb.setSourceList(Arrays.asList("element1", "element2")); return fb; }