Couple of issues:
1. The following comment is incorrect in DCTree.java
public static class DCReference extends DCEndPosTree<DCReference> implements ReferenceTree {
public final String signature;
// The following are not directly exposed through ReferenceTree
// use DocTrees.getElement(TreePath,ReferenceTree)
public final JCTree qualifierExpression;
DocTrees.getElement(TreePath,ReferenceTree) does not exist.
DocTrees.getElement(TreePath) exists albeit it returns the wrong element ie. the holder or owner
of the DocTree.
The following are the steps to extract the TypeElement, of a ThrowsTree's thrown TypeElement
such as java.io.IOException
ReferenceTree exceptionName = ((ThrowsTree) dtree).getExceptionName();
DocTreePath path = DocTreePath.getPath(path, docCommentTree, exceptionName);
System.out.println((TypeElement) instance.getElement(path));
1. The following comment is incorrect in DCTree.java
public static class DCReference extends DCEndPosTree<DCReference> implements ReferenceTree {
public final String signature;
// The following are not directly exposed through ReferenceTree
// use DocTrees.getElement(TreePath,ReferenceTree)
public final JCTree qualifierExpression;
DocTrees.getElement(TreePath,ReferenceTree) does not exist.
DocTrees.getElement(TreePath) exists albeit it returns the wrong element ie. the holder or owner
of the DocTree.
The following are the steps to extract the TypeElement, of a ThrowsTree's thrown TypeElement
such as java.io.IOException
ReferenceTree exceptionName = ((ThrowsTree) dtree).getExceptionName();
DocTreePath path = DocTreePath.getPath(path, docCommentTree, exceptionName);
System.out.println((TypeElement) instance.getElement(path));