List<PsiType[]> (@NotNull final PsiMethod method, @NotNull final PsiSubstitutor substitutor, String @NotNull [] options) { PsiElement context = createContext(method); PsiElementFactory factory = JavaPsiFacade.getElementFactory(method.getProject()); return ContainerUtil.map(options, value -> { try { PsiType original = factory.createTypeFromText("SomeUnexpectedDummyClass<" + value + ">", context); if (original instanceof PsiClassType) { PsiType[] parameters = ((PsiClassType)original).getParameters(); return ContainerUtil.map(parameters, substitutor::substitute).toArray(new PsiType[parameters.length]) ; } } catch (IncorrectOperationException e) { //do nothing. Just don't throw an exception } return new PsiType[]{PsiTypes.nullType()}; }); }