PsiType (@NotNull PsiType upperBound, @NotNull PsiElement place) { final PsiElementFactory elementFactory = JavaPsiFacade.getElementFactory(place.getProject()); final PsiTypeParameter parameter = elementFactory.createTypeParameterFromText("T", place); TypeConversionUtil.setInferredBoundsForSynthetic(parameter, null, upperBound); return elementFactory.createType(parameter); }