PsiWildcardType (@NotNull PsiWildcardType type, @NotNull PsiType newBound) { LOG.assertTrue(type.getBound() != null); LOG.assertTrue(newBound.isValid()); if (type.isExtends()) { if (newBound.equalsToText(CommonClassNames.JAVA_LANG_OBJECT)) { return PsiWildcardType.createUnbounded(type.getManager()); } return PsiWildcardType.createExtends(type.getManager(), newBound); } return PsiWildcardType.createSuper(type.getManager(), newBound); }