283 |
283 |
284 public static String getCommentText(Env<?> env, JCTree tree) { |
284 public static String getCommentText(Env<?> env, JCTree tree) { |
285 DocCommentTable docComments = (tree.hasTag(JCTree.Tag.TOPLEVEL)) |
285 DocCommentTable docComments = (tree.hasTag(JCTree.Tag.TOPLEVEL)) |
286 ? ((JCCompilationUnit) tree).docComments |
286 ? ((JCCompilationUnit) tree).docComments |
287 : env.toplevel.docComments; |
287 : env.toplevel.docComments; |
288 return docComments.getCommentText(tree); |
288 return (docComments == null) ? null : docComments.getCommentText(tree); |
289 } |
289 } |
290 |
290 |
291 /** The position of the first statement in a block, or the position of |
291 /** The position of the first statement in a block, or the position of |
292 * the block itself if it is empty. |
292 * the block itself if it is empty. |
293 */ |
293 */ |