/** * 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; }