PsiType (@NotNull PsiCapturedWildcardType capturedWildcardType) { PsiElement context = capturedWildcardType.getContext(); @Nullable PsiElement original = context.getCopyableUserData(SELF_REFERENCE); if (original != null) { context = original; } PsiCapturedWildcardType mapped = PsiCapturedWildcardType.create(capturedWildcardType.getWildcard(), context, capturedWildcardType.getTypeParameter()); mapped.setUpperBound(capturedWildcardType.getUpperBound(false).accept(this)); return mapped; }