Example usage for org.springframework.beans.factory.support StaticListableBeanFactory StaticListableBeanFactory

List of usage examples for org.springframework.beans.factory.support StaticListableBeanFactory StaticListableBeanFactory

Introduction

In this page you can find the example usage for org.springframework.beans.factory.support StaticListableBeanFactory StaticListableBeanFactory.

Prototype

public StaticListableBeanFactory() 

Source Link

Document

Create a regular StaticListableBeanFactory , to be populated with singleton bean instances through #addBean calls.

Usage

From source file:gov.nih.nci.cabig.ctms.web.tabs.StaticTabConfigurer.java

@SuppressWarnings("unchecked")
public StaticTabConfigurer(Object... beans) {
    staticFactory = new StaticListableBeanFactory();
    ModelMap modelMap = new ModelMap();
    modelMap.addAllObjects(Arrays.asList(beans));
    for (Object o : modelMap.entrySet()) {
        Map.Entry<String, Object> entry = (Map.Entry<String, Object>) o;
        staticFactory.addBean(entry.getKey(), entry.getValue());
    }//from w  w  w.  j av  a2 s  . c  o m
}