int initializeOptimized(@NotNull PluginDescriptor pluginDescriptor,
                          @NotNull List<? super StubFieldAccessor> result) {
    int resultSizeBefore = result.size();
    try {
      Class<?> aClass = ApplicationManager.getApplication().loadClass(holderClass, pluginDescriptor);
      if (externalIdPrefix == null) {
        // force init
        Class<?> initializedClass = Class.forName(aClass.getName(), true, aClass.getClassLoader());
        assert initializedClass == aClass;
      }
      else {
        assert aClass.isInterface();
        for (Field field : aClass.getDeclaredFields()) {
          if (!field.isSynthetic()) {
            result.add(new StubFieldAccessor(externalIdPrefix + field.getName(), field));
          }
        }
      }
    }
    catch (ClassNotFoundException e) {
      if (result.size() > resultSizeBefore) {
        result.subList(resultSizeBefore, result.size()).clear();
      }
      LOG.error(new PluginException(e, pluginDescriptor.getPluginId()));
    }
    catch (PluginException e) {
      if (result.size() > resultSizeBefore) {
        result.subList(resultSizeBefore, result.size()).clear();
      }
      LOG.error(e);
    }
    return result.size() - resultSizeBefore;
  }
int initializeOptimized(@NotNull PluginDescriptor pluginDescriptor,
                          @NotNull List<? super StubFieldAccessor> result)