boolean (@NotNull PsiElement element, @NotNull MetaInfo metaInfo) { PsiClass psiClass = PsiTreeUtil.getParentOfType(element, PsiClass.class); if (psiClass == null) return false; if (!metaInfo.className.equals(psiClass.getQualifiedName())) return false; if (element instanceof PsiMethod psiMethod) { return (metaInfo.methodName.equals(psiMethod.getName()) || (metaInfo.callType == MetaInfoCallType.NON_STATIC_INIT && psiMethod.isConstructor())); } return metaInfo.callType == MetaInfoCallType.NON_STATIC_INIT || metaInfo.callType == MetaInfoCallType.STATIC_INIT; }