1.1 --- a/src/share/classes/com/sun/tools/javac/api/JavacTrees.java Thu Dec 09 08:24:42 2010 -0800 1.2 +++ b/src/share/classes/com/sun/tools/javac/api/JavacTrees.java Thu Dec 09 08:48:08 2010 -0800 1.3 @@ -228,6 +228,17 @@ 1.4 return new JavacScope(getAttrContext(path)); 1.5 } 1.6 1.7 + public String getDocComment(TreePath path) { 1.8 + CompilationUnitTree t = path.getCompilationUnit(); 1.9 + if (t instanceof JCTree.JCCompilationUnit) { 1.10 + JCCompilationUnit cu = (JCCompilationUnit) t; 1.11 + if (cu.docComments != null) { 1.12 + return cu.docComments.get(path.getLeaf()); 1.13 + } 1.14 + } 1.15 + return null; 1.16 + } 1.17 + 1.18 public boolean isAccessible(Scope scope, TypeElement type) { 1.19 if (scope instanceof JavacScope && type instanceof ClassSymbol) { 1.20 Env<AttrContext> env = ((JavacScope) scope).env;