1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Resolve.java Tue Dec 18 00:24:54 2012 -0800 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Resolve.java Tue Dec 18 10:23:40 2012 +0100 1.3 @@ -1798,6 +1798,9 @@ 1.4 1.5 if ((kind & TYP) != 0) { 1.6 sym = findType(env, name); 1.7 + if (sym.kind==TYP) { 1.8 + reportDependence(env.enclClass.sym, sym); 1.9 + } 1.10 if (sym.exists()) return sym; 1.11 else if (sym.kind < bestSoFar.kind) bestSoFar = sym; 1.12 } 1.13 @@ -1806,6 +1809,14 @@ 1.14 else return bestSoFar; 1.15 } 1.16 1.17 + /** Report dependencies. 1.18 + * @param from The enclosing class sym 1.19 + * @param to The found identifier that the class depends on. 1.20 + */ 1.21 + public void reportDependence(Symbol from, Symbol to) { 1.22 + // Override if you want to collect the reported dependencies. 1.23 + } 1.24 + 1.25 /** Find an identifier in a package which matches a specified kind set. 1.26 * @param env The current environment. 1.27 * @param name The identifier's name.