public static boolean canCollapseToDiamond(final PsiNewExpression expression,
                                             final PsiNewExpression context,
                                             final @Nullable PsiType expectedType) {
    return canCollapseToDiamond(expression, context, expectedType, false);
  }
public static boolean canCollapseToDiamond(final PsiNewExpression expression,
                                             final PsiNewExpression context,
                                             final @Nullable PsiType expectedType)