public Content getTypeAnnotationLinks(LinkInfo linkInfo) { Content links = newContent(); if (linkInfo.type.asAnnotatedType() == null) return links; AnnotationDesc[] annotations = linkInfo.type.asAnnotatedType().annotations(); for (int i = 0; i < annotations.length; i++) { if (i > 0) { links.addContent(" "); } links.addContent(getTypeAnnotationLink(linkInfo, annotations[i])); } links.addContent(" "); return links; } }
public Content getTypeAnnotationLinks(LinkInfo linkInfo) { ContentBuilder links = new ContentBuilder(); AnnotationDesc[] annotations; if (linkInfo.type instanceof AnnotatedType) { annotations = linkInfo.type.asAnnotatedType().annotations(); } else if (linkInfo.type instanceof TypeVariable) { annotations = linkInfo.type.asTypeVariable().annotations(); } else { return links; } if (annotations.length == 0) return links; List<Content> annos = m_writer.getAnnotations(0, annotations, false, linkInfo.isJava5DeclarationLocation); boolean isFirst = true; for (Content anno : annos) { if (!isFirst) { links.addContent(" "); } links.addContent(anno); isFirst = false; } if (!annos.isEmpty()) { links.addContent(" "); } return links; }
Type rcvrType = member.receiverType(); if (includeAnnotations && rcvrType instanceof AnnotatedType) { AnnotationDesc[] descList = rcvrType.asAnnotatedType().annotations(); if (descList.length > 0) { addReceiverAnnotations(member, rcvrType, descList, htmltree);
} else if (type.asAnnotatedType() != null && type.dimension().length() == 0) { link.addContent(getTypeAnnotationLinks(linkInfo)); linkInfo.type = type.asAnnotatedType().underlyingType(); link.addContent(getLink(linkInfo)); return link; } else { while (type != null && type.dimension().length() > 0) { if (type.asAnnotatedType() != null) { linkInfo.type = type; link.addContent(" "); link.addContent(getTypeAnnotationLinks(linkInfo)); link.addContent("[]"); type = type.asAnnotatedType().underlyingType().getElementType(); } else { link.addContent("[]");