< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java

Print this page

        

*** 49,59 **** import javax.lang.model.element.TypeElement; import javax.lang.model.element.VariableElement; import javax.lang.model.type.DeclaredType; import javax.lang.model.type.TypeMirror; import javax.lang.model.util.SimpleAnnotationValueVisitor9; ! import javax.lang.model.util.SimpleElementVisitor9; import javax.lang.model.util.SimpleTypeVisitor9; import com.sun.source.doctree.AttributeTree; import com.sun.source.doctree.AttributeTree.ValueKind; import com.sun.source.doctree.CommentTree; --- 49,59 ---- import javax.lang.model.element.TypeElement; import javax.lang.model.element.VariableElement; import javax.lang.model.type.DeclaredType; import javax.lang.model.type.TypeMirror; import javax.lang.model.util.SimpleAnnotationValueVisitor9; ! import javax.lang.model.util.SimpleElementVisitor14; import javax.lang.model.util.SimpleTypeVisitor9; import com.sun.source.doctree.AttributeTree; import com.sun.source.doctree.AttributeTree.ValueKind; import com.sun.source.doctree.CommentTree;
*** 1510,1520 **** } @Override public Boolean visitLink(LinkTree node, Content c) { // we need to pass the DocTreeImpl here, so ignore node ! result.add(seeTagToContent(element, tag)); return false; } @Override public Boolean visitLiteral(LiteralTree node, Content c) { --- 1510,1521 ---- } @Override public Boolean visitLink(LinkTree node, Content c) { // we need to pass the DocTreeImpl here, so ignore node ! Content content = seeTagToContent(element, tag); ! result.add(content); return false; } @Override public Boolean visitLiteral(LiteralTree node, Content c) {
*** 1658,1674 **** * @param element the Element object whose documentation is being written. * @param tt the text being written. * * @return the text, with all the relative links redirected to work. */ private String redirectRelativeLinks(Element element, TextTree tt) { String text = tt.getBody(); if (element == null || utils.isOverviewElement(element) || shouldNotRedirectRelativeLinks()) { return text; } ! DocPath redirectPathFromRoot = new SimpleElementVisitor9<DocPath, Void>() { @Override public DocPath visitType(TypeElement e, Void p) { return docPaths.forPackage(utils.containingPackage(e)); } --- 1659,1676 ---- * @param element the Element object whose documentation is being written. * @param tt the text being written. * * @return the text, with all the relative links redirected to work. */ + @SuppressWarnings("preview") private String redirectRelativeLinks(Element element, TextTree tt) { String text = tt.getBody(); if (element == null || utils.isOverviewElement(element) || shouldNotRedirectRelativeLinks()) { return text; } ! DocPath redirectPathFromRoot = new SimpleElementVisitor14<DocPath, Void>() { @Override public DocPath visitType(TypeElement e, Void p) { return docPaths.forPackage(utils.containingPackage(e)); }
*** 1747,1772 **** public void addAnnotationInfo(Element element, Content htmltree) { addAnnotationInfo(element.getAnnotationMirrors(), htmltree); } /** ! * Add the annotatation types for the given element and parameter. * * @param param the parameter to write annotations for. * @param tree the content tree to which the annotation types will be added */ public boolean addAnnotationInfo(VariableElement param, Content tree) { ! Content annotaionInfo = getAnnotationInfo(param.getAnnotationMirrors(), false); ! if (annotaionInfo.isEmpty()) { return false; } ! tree.add(annotaionInfo); return true; } /** ! * Adds the annotatation types for the given Element. * * @param descList a list of annotation mirrors. * @param htmltree the documentation tree to which the annotation info will be * added */ --- 1749,1774 ---- public void addAnnotationInfo(Element element, Content htmltree) { addAnnotationInfo(element.getAnnotationMirrors(), htmltree); } /** ! * Add the annotation types for the given element and parameter. * * @param param the parameter to write annotations for. * @param tree the content tree to which the annotation types will be added */ public boolean addAnnotationInfo(VariableElement param, Content tree) { ! Content annotationInfo = getAnnotationInfo(param.getAnnotationMirrors(), false); ! if (annotationInfo.isEmpty()) { return false; } ! tree.add(annotationInfo); return true; } /** ! * Adds the annotation types for the given Element. * * @param descList a list of annotation mirrors. * @param htmltree the documentation tree to which the annotation info will be * added */
< prev index next >