private static PsiElement getNameElement(PsiNewExpression targetElement) {
    PsiJavaCodeReferenceElement referenceElement = getReferenceElement(targetElement);
    return referenceElement != null ? referenceElement.getReferenceNameElement() : null;
  }
private static PsiElement getNameElement(PsiNewExpression targetElement)