PsiModifierListOwner ( PsiMethodCallExpression methodCallExpression) { final PsiExpressionList argumentList = methodCallExpression.getArgumentList(); final PsiExpression[] arguments = argumentList.getExpressions(); if (arguments.length < 1) { return null; } final PsiExpression argument = arguments[0]; if (argument instanceof PsiReferenceExpression referenceExpression) { final PsiElement element = referenceExpression.resolve(); if (element instanceof PsiModifierListOwner) { return (PsiModifierListOwner)element; } } return null; }