src/share/classes/com/sun/tools/sjavac/comp/ResolveWithDeps.java

Print this page




  45         super(context);
  46         deps = Dependencies.instance(context);
  47     }
  48 
  49     public static void preRegister(Context context) {
  50         context.put(resolveKey, new Context.Factory<Resolve>() {
  51             public Resolve make(Context c) {
  52                 Resolve instance = new ResolveWithDeps(c);
  53                 c.put(Resolve.class, instance);
  54                 return instance;
  55             }
  56         });
  57     }
  58     /** Collect dependencies in the enclosing class
  59      * @param from The enclosing class sym
  60      * @param to   The enclosing classes references this sym.
  61      * */
  62     @Override
  63     public void reportDependence(Symbol from, Symbol to) {
  64         // Capture dependencies between the packages.
  65         deps.collect(from.packge().fullname, to.packge().fullname);





  66     }
  67 }


  45         super(context);
  46         deps = Dependencies.instance(context);
  47     }
  48 
  49     public static void preRegister(Context context) {
  50         context.put(resolveKey, new Context.Factory<Resolve>() {
  51             public Resolve make(Context c) {
  52                 Resolve instance = new ResolveWithDeps(c);
  53                 c.put(Resolve.class, instance);
  54                 return instance;
  55             }
  56         });
  57     }
  58     /** Collect dependencies in the enclosing class
  59      * @param from The enclosing class sym
  60      * @param to   The enclosing classes references this sym.
  61      * */
  62     @Override
  63     public void reportDependence(Symbol from, Symbol to) {
  64         // Capture dependencies between the packages.
  65         deps.reportPackageDep(from.packge().fullname, to.packge().fullname);
  66         // It would be convenient to check if to.outermost comes from source or classpath
  67         // and only report it, if its from the classpath. This would reduce the amount
  68         // of data sent over the wire to the sjavac client. Can this be done? All interesting
  69         // classes are private within javac/file or javac/jvm....
  70         deps.reportClassDep(to.outermostClass());
  71     }
  72 }