KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > spring > kernel > MapLocator


1 /**
2  * User: alesj
3  * Date: 18.4.2006
4  * Time: 12:42:33
5  *
6  * (C) Genera Lynx d.o.o.
7  */

8
9 package org.jboss.spring.kernel;
10
11 import java.util.Map JavaDoc;
12
13 /**
14  * @author <a HREF="mailto:ales.justin@genera-lynx.com">Ales Justin</a>
15  */

16 public class MapLocator implements Locator
17 {
18
19    private Map JavaDoc map;
20
21    public MapLocator(Map JavaDoc map)
22    {
23       this.map = map;
24    }
25
26    public Map JavaDoc getMap()
27    {
28       return map;
29    }
30
31    public Object JavaDoc locateBean(String JavaDoc beanName)
32    {
33       return getMap().get(beanName);
34    }
35
36 }
37
Popular Tags