boolean (@Nullable PsiElement element) { if (element instanceof PsiMethod) { return !getHardcodedContracts((PsiMethod)element, null).isEmpty(); } if (element instanceof PsiParameter) { PsiElement parent = element.getParent(); return parent != null && hasHardcodedContracts(parent.getParent()); } return false; }