// sees each class once, and (2) that they haven't been desugared yet.
if (!seen.add(env.tree)) {
return;
}
TreePath path;
if (env.toplevel != env.tree) {
// The current tree is a class decl, so construct a TreePath rooted at the enclosing
// compilation unit.
path = TreePath.getPath(env.toplevel, env.tree);
} else {
// The current tree is a compilation unit. Wrap the compilation unit to hide its class
// decls, since (1) we've already visited them, and (2) the bodies of all but the last class
// decl have been lowered out of them.
path = new TreePath(new DeclFreeCompilationUnitWrapper(env.toplevel));
}
errorProneScanner.scan(path, createVisitorState(env));
} catch (CompletionFailure e) {
// A CompletionFailure can be triggered when error-prone tries to complete a symbol
// that isn't on the compilation classpath. This can occur when a check performs an