ClassMapCachingNulls<MultiHostInjector> () { Map<Class<?>, MultiHostInjector[]> injectors = new HashMap<>(); List<MultiHostInjector> allInjectors = new ArrayList<>(myManualInjectors); allInjectors.addAll(MultiHostInjector.MULTIHOST_INJECTOR_EP_NAME.getExtensions(myProject)); if (LanguageInjector.EXTENSION_POINT_NAME.hasAnyExtensions()) { allInjectors.add(PsiManagerRegisteredInjectorsAdapter.INSTANCE); } for (MultiHostInjector injector : allInjectors) { for (Class<? extends PsiElement> place : injector.elementsToInjectIn()) { LOG.assertTrue(place != null, injector); MultiHostInjector[] existing = injectors.get(place); injectors.put(place, existing == null ? new MultiHostInjector[]{injector} : ArrayUtil.append(existing, injector)); } } return new ClassMapCachingNulls<>(injectors, new MultiHostInjector[0], allInjectors); }