@@ -87,6 +87,11 @@ public static DocTrees instance(ProcessingEnvironment env) {
87
87
/**
88
88
* Returns the doc comment tree, if any, for the Tree node identified by a given TreePath.
89
89
* Returns {@code null} if no doc comment was found.
90
+ *
91
+ * @implNote The default implementation of this method returns the same
92
+ * {@code DocCommentTree} instance for repeated invocations
93
+ * with the same argument.
94
+ *
90
95
* @param path the path for the tree node
91
96
* @return the doc comment tree
92
97
*/
@@ -95,6 +100,11 @@ public static DocTrees instance(ProcessingEnvironment env) {
95
100
/**
96
101
* Returns the doc comment tree of the given element.
97
102
* Returns {@code null} if no doc comment was found.
103
+ *
104
+ * @implNote The default implementation of this method returns the same
105
+ * {@code DocCommentTree} instance for repeated invocations
106
+ * with the same argument.
107
+ *
98
108
* @param e an element whose documentation is required
99
109
* @return the doc comment tree
100
110
*
@@ -109,6 +119,9 @@ public static DocTrees instance(ProcessingEnvironment env) {
109
119
* Returns {@code null} if no doc comment was found.
110
120
* Future releases may support additional file types.
111
121
*
122
+ * @implNote The default implementation of this method returns a
123
+ * new {@code DocCommentTree} instance for each invocation.
124
+ *
112
125
* @param fileObject the content container
113
126
* @return the doc comment tree
114
127
* @since 9
@@ -123,6 +136,9 @@ public static DocTrees instance(ProcessingEnvironment env) {
123
136
* Returns {@code null} if no doc comment was found.
124
137
* Future releases may support additional file types.
125
138
*
139
+ * @implNote The default implementation of this method returns a
140
+ * new {@code DocCommentTree} instance for each invocation.
141
+ *
126
142
* @param e an element whose path is used as a reference
127
143
* @param relativePath the relative path from the Element
128
144
* @return the doc comment tree
0 commit comments