public static boolean hasModifierProperty(@Nullable ASTNode element,
                                            @NotNull IElementType property) {
    if (element == null) {
      return false;
    }
    ASTNode modifierList = findChildByType(element, BASIC_MODIFIER_LIST);
    if (modifierList == null) {
      return false;
    }
    ASTNode firstChild = modifierList.getFirstChildNode();
    if (firstChild == null) {
      return false;
    }
    for (ASTNode child = firstChild; child != null; child = child.getTreeNext()) {
      if (is(child, property)) {
        return true;
      }
    }
    return false;
  }
public static boolean hasModifierProperty(@Nullable ASTNode element,
                                            @NotNull IElementType property)