39
39
40
40
import com .sun .source .doctree .DocCommentTree ;
41
41
import com .sun .source .doctree .DocTree ;
42
+ import com .sun .source .doctree .EntityTree ;
43
+ import com .sun .source .tree .CompilationUnitTree ;
42
44
43
45
/**
44
46
* Provides access to syntax trees for doc comments.
@@ -202,19 +204,17 @@ public static DocTrees instance(ProcessingEnvironment env) {
202
204
* @param root the compilation unit that contains tree
203
205
*/
204
206
public abstract void printMessage (Diagnostic .Kind kind , CharSequence msg ,
205
- com .sun .source .doctree .DocTree t ,
206
- com .sun .source .doctree .DocCommentTree c ,
207
- com .sun .source .tree .CompilationUnitTree root );
207
+ DocTree t , DocCommentTree c , CompilationUnitTree root );
208
208
209
209
/**
210
210
* Sets the break iterator to compute the first sentence of
211
211
* documentation comments.
212
- * @param breakiterator a break iterator or {@code null} to specify the default
212
+ * @param breakIterator a break iterator or {@code null} to specify the default
213
213
* sentence breaker
214
214
*
215
215
* @since 9
216
216
*/
217
- public abstract void setBreakIterator (BreakIterator breakiterator );
217
+ public abstract void setBreakIterator (BreakIterator breakIterator );
218
218
219
219
/**
220
220
* Returns a utility object for creating {@code DocTree} objects.
@@ -223,4 +223,16 @@ public abstract void printMessage(Diagnostic.Kind kind, CharSequence msg,
223
223
* @since 9
224
224
*/
225
225
public abstract DocTreeFactory getDocTreeFactory ();
226
+
227
+ /**
228
+ * Returns a string containing the characters for the entity in a given entity tree,
229
+ * or {@code null} if the tree does not represent a valid series of characters.
230
+ *
231
+ * <p>The interpretation of entities is based on section
232
+ * <a href="https://www.w3.org/TR/html52/syntax.html#character-references">8.1.4. Character references</a>
233
+ * in the HTML 5.2 specification.</p>
234
+ *
235
+ * @return a string containing the characters
236
+ */
237
+ public abstract String getCharacters (EntityTree tree );
226
238
}
0 commit comments