boolean (@NotNull ASTNode elem, IElementType parentElementType) { ASTNode parent = elem.getTreeParent(); if (parent != null && parent.getElementType() == parentElementType) { return isModifierListWithSingleAnnotation(elem); } return false; }