PsiType (PsiType type, PsiElement context) { final PsiTypeMapper visitor = new GrTypeMapper(context) { @Override public PsiType visitCapturedWildcardType(@NotNull PsiCapturedWildcardType capturedWildcardType) { return getJavaLangObject(context); } @Override public PsiType visitWildcardType(@NotNull PsiWildcardType capturedWildcardType) { return getJavaLangObject(context); } }; return type.accept(visitor); }