boolean (PsiNewExpression exp, PsiMethod method) { final PsiExpression[] arrayDimensions = exp.getArrayDimensions(); for (final PsiExpression arrayDimension : arrayDimensions) { if (expressionDefinitelyRecurses(arrayDimension, method)) { return true; } } final PsiArrayInitializerExpression arrayInitializer = exp .getArrayInitializer(); if (expressionDefinitelyRecurses(arrayInitializer, method)) { return true; } final PsiExpression qualifier = exp.getQualifier(); if (expressionDefinitelyRecurses(qualifier, method)) { return true; } final PsiExpressionList argumentList = exp.getArgumentList(); if (argumentList != null) { final PsiExpression[] args = argumentList.getExpressions(); for (final PsiExpression arg : args) { if (expressionDefinitelyRecurses(arg, method)) { return true; } } } return false; }