private <T> T doGetService(@NotNull Class<T> serviceClass, boolean createIfNeeded) {
    T service = super.getService(serviceClass);
    if (service == null &&
        createIfNeeded &&
        Modifier.isFinal(serviceClass.getModifiers()) &&
        serviceClass.isAnnotationPresent(Service.class)) {
      //noinspection SynchronizeOnThis,SynchronizationOnLocalVariableOrMethodParameter
      synchronized (serviceClass) {
        service = super.getService(serviceClass);
        if (service != null) {
          return service;
        }

        getPicoContainer().registerComponentImplementation(serviceClass.getName(), serviceClass);
        return super.getService(serviceClass);
      }
    }
    return service;
  }
private <T> T doGetService(@NotNull Class<T> serviceClass, boolean createIfNeeded)