1.1 --- a/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java Wed Sep 04 14:44:05 2013 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java Thu Sep 05 11:27:27 2013 +0200 1.3 @@ -80,7 +80,7 @@ 1.4 * This code and its internal interfaces are subject to change or 1.5 * deletion without notice.</b> 1.6 */ 1.7 -public class JavaCompiler implements ClassReader.SourceCompleter { 1.8 +public class JavaCompiler { 1.9 /** The context key for the compiler. */ 1.10 protected static final Context.Key<JavaCompiler> compilerKey = 1.11 new Context.Key<JavaCompiler>(); 1.12 @@ -311,6 +311,17 @@ 1.13 protected JavaCompiler delegateCompiler; 1.14 1.15 /** 1.16 + * SourceCompleter that delegates to the complete-method of this class. 1.17 + */ 1.18 + protected final ClassReader.SourceCompleter thisCompleter = 1.19 + new ClassReader.SourceCompleter() { 1.20 + @Override 1.21 + public void complete(ClassSymbol sym) throws CompletionFailure { 1.22 + JavaCompiler.this.complete(sym); 1.23 + } 1.24 + }; 1.25 + 1.26 + /** 1.27 * Command line options. 1.28 */ 1.29 protected Options options; 1.30 @@ -374,7 +385,7 @@ 1.31 types = Types.instance(context); 1.32 taskListener = MultiTaskListener.instance(context); 1.33 1.34 - reader.sourceCompleter = this; 1.35 + reader.sourceCompleter = thisCompleter; 1.36 1.37 options = Options.instance(context); 1.38