1 3 package jodd.petite.scope; 4 5 import java.util.Map ; 6 import java.util.HashMap ; 7 8 12 public class SingletonScope implements Scope { 13 14 protected Map <String , Object > instances = new HashMap <String , Object >(); 15 16 public Object lookup(String name) { 17 return instances.get(name); 18 } 19 20 public void register(String name, Object object) { 21 instances.put(name, object); 22 } 23 } 24 | Popular Tags |