boolean ( PsiVariable variable) { if (variable instanceof PsiParameter parameter) { final PsiElement scope = parameter.getDeclarationScope(); if (scope instanceof PsiMethod method) { if (isOverrideOfLibraryMethod(method)) { return true; } } } return false; }