mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
8004832: Add new doclint package
Reviewed-by: mcimadamore
This commit is contained in:
parent
c5acce4569
commit
4a3e904c6e
100 changed files with 4459 additions and 28 deletions
|
@ -60,14 +60,20 @@ public class TreePath implements Iterable<Tree> {
|
|||
this.path = path;
|
||||
}
|
||||
}
|
||||
|
||||
class PathFinder extends TreePathScanner<TreePath,Tree> {
|
||||
public TreePath scan(Tree tree, Tree target) {
|
||||
if (tree == target)
|
||||
if (tree == target) {
|
||||
throw new Result(new TreePath(getCurrentPath(), target));
|
||||
}
|
||||
return super.scan(tree, target);
|
||||
}
|
||||
}
|
||||
|
||||
if (path.getLeaf() == target) {
|
||||
return path;
|
||||
}
|
||||
|
||||
try {
|
||||
new PathFinder().scan(path, target);
|
||||
} catch (Result result) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue