langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
changeset 19921 58bcbe156057
parent 19664 4369a475040a
child 20249 93f8eae31092
--- a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Wed Sep 04 14:44:05 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Thu Sep 05 11:27:27 2013 +0200
@@ -80,7 +80,7 @@
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
-public class JavaCompiler implements ClassReader.SourceCompleter {
+public class JavaCompiler {
     /** The context key for the compiler. */
     protected static final Context.Key<JavaCompiler> compilerKey =
         new Context.Key<JavaCompiler>();
@@ -311,6 +311,17 @@
     protected JavaCompiler delegateCompiler;
 
     /**
+     * SourceCompleter that delegates to the complete-method of this class.
+     */
+    protected final ClassReader.SourceCompleter thisCompleter =
+            new ClassReader.SourceCompleter() {
+                @Override
+                public void complete(ClassSymbol sym) throws CompletionFailure {
+                    JavaCompiler.this.complete(sym);
+                }
+            };
+
+    /**
      * Command line options.
      */
     protected Options options;
@@ -374,7 +385,7 @@
         types = Types.instance(context);
         taskListener = MultiTaskListener.instance(context);
 
-        reader.sourceCompleter = this;
+        reader.sourceCompleter = thisCompleter;
 
         options = Options.instance(context);