code: private static DynamicConfiguration getConfiguration(final ServiceLocator locator) {
          final DynamicConfigurationService dcs = locator.getService(DynamicConfigurationService.class);
          return dcs.createDynamicConfiguration();
      }
docs: Get service locator {@link DynamicConfiguration dynamic configuration}.
  
  @param locator HK2 service locator.
  @return dynamic configuration for a given service locator.