boolean (PsiType type) { return type.accept(new PsiTypeVisitor<Boolean>() { @Override public Boolean visitType(@NotNull PsiType type) { return false; } @Override public Boolean visitCapturedWildcardType(@NotNull PsiCapturedWildcardType capturedWildcardType) { return true; } }); }