/** * {@inheritDoc} */ public void writeAnnotationTypeDeprecationInfo() { hr(); Tag[] deprs = annotationType.tags( "deprecated" ); if( Util.isDeprecated( annotationType ) ) { strongText( "doclet.Deprecated" ); if( deprs.length > 0 ) { Tag[] commentTags = deprs[0].inlineTags(); if( commentTags.length > 0 ) { space(); printInlineDeprecatedComment( annotationType, deprs[0] ); } } p(); } }
/** * Parse an annotation. * * @param annotationTypeDoc * A AnnotationTypeDoc instance * @return the annotation node */ protected Annotation parseAnnotationTypeDoc(AnnotationTypeDoc annotationTypeDoc) { Annotation annotationNode = objectFactory.createAnnotation(); annotationNode.setName(annotationTypeDoc.name()); annotationNode.setQualified(annotationTypeDoc.qualifiedName()); String comment = annotationTypeDoc.commentText(); if (comment.length() > 0) { annotationNode.setComment(comment); } annotationNode.setIncluded(annotationTypeDoc.isIncluded()); annotationNode.setScope(parseScope(annotationTypeDoc)); for (AnnotationTypeElementDoc annotationTypeElementDoc : annotationTypeDoc.elements()) { annotationNode.getElement().add(parseAnnotationTypeElementDoc(annotationTypeElementDoc)); } for (AnnotationDesc annotationDesc : annotationTypeDoc.annotations()) { annotationNode.getAnnotation().add(parseAnnotationDesc(annotationDesc, annotationTypeDoc.qualifiedName())); } for (Tag tag : annotationTypeDoc.tags()) { annotationNode.getTag().add(parseTag(tag)); } return annotationNode; }
/** * {@inheritDoc} */ public void addAnnotationTypeDeprecationInfo(Content annotationInfoTree) { Content hr = new HtmlTree(HtmlTag.HR); annotationInfoTree.addContent(hr); Tag[] deprs = annotationType.tags("deprecated"); if (Util.isDeprecated(annotationType)) { Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase); Content div = HtmlTree.DIV(HtmlStyle.block, deprLabel); if (deprs.length > 0) { Tag[] commentTags = deprs[0].inlineTags(); if (commentTags.length > 0) { div.addContent(getSpace()); addInlineDeprecatedComment(annotationType, deprs[0], div); } } annotationInfoTree.addContent(div); } }