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