1 15 package org.apache.hivemind.internal; 16 17 import org.apache.hivemind.definition.ConstructionContext; 18 19 24 public abstract class AbstractConstructionContext implements ConstructionContext 25 { 26 private Module _definingModule; 27 28 public AbstractConstructionContext(Module definingModule) 29 { 30 _definingModule = definingModule; 31 } 32 33 public Object getConfiguration(String configurationId) 34 { 35 return _definingModule.getConfiguration(configurationId); 36 } 37 38 41 public Module getDefiningModule() 42 { 43 return _definingModule; 44 } 45 46 49 public Object getService(String serviceId, Class serviceInterface) 50 { 51 return _definingModule.getService(serviceId, serviceInterface); 52 } 53 54 57 public Object getService(Class serviceInterface) 58 { 59 return _definingModule.getService(serviceInterface); 60 } 61 62 65 public boolean containsService(Class serviceInterface) 66 { 67 return _definingModule.containsService(serviceInterface); 68 } 69 70 73 public RegistryInfrastructure getRegistry() 74 { 75 return getDefiningModule().getRegistry(); 76 } 77 78 } 79 | Popular Tags |