PsiDocTag (String name) { if (getFirstChildNode().getElementType() == JavaDocElementType.DOC_COMMENT) { if (!getFirstChildNode().getText().contains(name)) return null; } for (ASTNode child = getFirstChildNode(); child != null; child = child.getTreeNext()) { if (child.getElementType() == DOC_TAG) { PsiDocTag tag = SourceTreeToPsiMap.treeToPsiNotNull(child); CharSequence nameText = ((LeafElement)tag.getNameElement()).getChars(); if (nameText.length() > 0 && nameText.charAt(0) == '@' && CharArrayUtil.regionMatches(nameText, 1, name)) { return tag; } } } return null; }