src/share/classes/com/sun/tools/sjavac/comp/AttrWithDeps.java
Print this page
@@ -26,11 +26,11 @@
import com.sun.tools.javac.comp.Attr;
import com.sun.tools.javac.util.Context;
import com.sun.tools.javac.code.Symbol;
-/** Subclass to Attr that overrides reportDepedence.
+/** Subclass to Attr that overrides collect.
*
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own
* risk. This code and its internal interfaces are subject to change
* or deletion without notice.</b></p>
@@ -61,8 +61,13 @@
* @param to The enclosing classes references this sym.
* */
@Override
public void reportDependence(Symbol from, Symbol to) {
// Capture dependencies between the packages.
- deps.collect(from.packge().fullname, to.packge().fullname);
+ deps.reportPackageDep(from.packge().fullname, to.packge().fullname);
+ // It would be convenient to check if to.outermost comes from source or classpath
+ // and only report it, if its from the classpath. This would reduce the amount
+ // of data sent over the wire to the sjavac client. Can this be done? All interesting
+ // classes are private within javac/file or javac/jvm....
+ deps.reportClassDep(to.outermostClass());
}
}