Java Code Examples for org.springframework.beans.factory.config.MapFactoryBean

The following examples show how to use org.springframework.beans.factory.config.MapFactoryBean. These examples are extracted from open source projects. 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 Project: spring-analysis-note   Source File: XmlBeanCollectionTests.java    License: MIT License 6 votes vote down vote up
@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 Project: java-technology-stack   Source File: XmlBeanCollectionTests.java    License: MIT License 6 votes vote down vote up
@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
@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 Project: spring-analysis-note   Source File: UtilNamespaceHandler.java    License: MIT License 4 votes vote down vote up
@Override
protected Class<?> getBeanClass(Element element) {
	return MapFactoryBean.class;
}
 
Example 5
Source Project: java-technology-stack   Source File: UtilNamespaceHandler.java    License: MIT License 4 votes vote down vote up
@Override
protected Class<?> getBeanClass(Element element) {
	return MapFactoryBean.class;
}
 
Example 6
Source Project: lams   Source File: UtilNamespaceHandler.java    License: GNU General Public License v2.0 4 votes vote down vote up
@Override
protected Class<?> getBeanClass(Element element) {
	return MapFactoryBean.class;
}
 
Example 7
Source Project: blog_demos   Source File: UtilNamespaceHandler.java    License: Apache License 2.0 4 votes vote down vote up
@Override
protected Class<?> getBeanClass(Element element) {
	return MapFactoryBean.class;
}
 
Example 8
@Override
protected Class<?> getBeanClass(Element element) {
	return MapFactoryBean.class;
}
 
Example 9
@Override
protected String getBeanClassName(Element element) {
	return MapFactoryBean.class.getName();
}