< prev index next >
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
Print this page
@@ -49,11 +49,11 @@
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.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,11 +1510,12 @@
}
@Override
public Boolean visitLink(LinkTree node, Content c) {
// we need to pass the DocTreeImpl here, so ignore node
- result.add(seeTagToContent(element, tag));
+ Content content = seeTagToContent(element, tag);
+ result.add(content);
return false;
}
@Override
public Boolean visitLiteral(LiteralTree node, Content c) {
@@ -1658,17 +1659,18 @@
* @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 SimpleElementVisitor9<DocPath, Void>() {
+ DocPath redirectPathFromRoot = new SimpleElementVisitor14<DocPath, Void>() {
@Override
public DocPath visitType(TypeElement e, Void p) {
return docPaths.forPackage(utils.containingPackage(e));
}
@@ -1747,26 +1749,26 @@
public void addAnnotationInfo(Element element, Content htmltree) {
addAnnotationInfo(element.getAnnotationMirrors(), htmltree);
}
/**
- * Add the annotatation types for the given element and parameter.
+ * 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 annotaionInfo = getAnnotationInfo(param.getAnnotationMirrors(), false);
- if (annotaionInfo.isEmpty()) {
+ Content annotationInfo = getAnnotationInfo(param.getAnnotationMirrors(), false);
+ if (annotationInfo.isEmpty()) {
return false;
}
- tree.add(annotaionInfo);
+ tree.add(annotationInfo);
return true;
}
/**
- * Adds the annotatation types for the given Element.
+ * 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 >