}
public ServiceLocator getServiceLocator() {
if (serviceLocator == null) {
Metrix.event("Init hk2 - start");
ModulesRegistry registry = new StaticModulesRegistry(this.classLoader);
serviceLocator = registry.createServiceLocator("default");
if (programOptions != null) {
ServiceLocatorUtilities.addOneConstant(serviceLocator, programOptions);
}
if (environment != null) {
ServiceLocatorUtilities.addOneConstant(serviceLocator, environment);