@NotNull
    @Override
    public BuildTargetLoader<CheckResourcesTarget> createLoader(@NotNull JpsModel model) {
      final Map<String, JpsModule> modules = new HashMap<>();
      for (JpsModule module : model.getProject().getModules()) {
        modules.put(module.getName(), module);
      }
      return new BuildTargetLoader<CheckResourcesTarget>() {
        @Nullable
        @Override
        public CheckResourcesTarget createTarget(@NotNull String targetId) {
          JpsModule module = modules.get(targetId);
          return module != null ? new CheckResourcesTarget(module, Type.this) : null;
        }
      };
    }
@NotNull
    @Override
    public BuildTargetLoader<CheckResourcesTarget> createLoader(@NotNull JpsModel model)