< prev index next >

test/langtools/tools/javac/processing/model/TestSymtabItems.java

Print this page
*** 45,10 ***
--- 45,12 ---
  import javax.lang.model.type.TypeMirror;
  import javax.lang.model.type.UnknownTypeException;
  import javax.lang.model.util.*;
  
  import com.sun.tools.javac.code.Symbol.ClassSymbol;
+ import com.sun.tools.javac.code.Symbol.Completer;
+ import com.sun.tools.javac.code.Symbol.ModuleSymbol;
  import com.sun.tools.javac.code.Symtab;
  import com.sun.tools.javac.file.JavacFileManager;
  import com.sun.tools.javac.main.JavaCompiler;
  import com.sun.tools.javac.model.JavacTypes;
  import com.sun.tools.javac.util.Context;

*** 125,11 ***
      class ElemPrinter extends ElementScanner14<Void, Void> {
          @Override
          public Void visitModule(ModuleElement e, Void p) {
              show("module", e);
              indent(+1);
!             super.visitModule(e, p);
              indent(-1);
              return null;
          }
  
          @Override
--- 127,16 ---
      class ElemPrinter extends ElementScanner14<Void, Void> {
          @Override
          public Void visitModule(ModuleElement e, Void p) {
              show("module", e);
              indent(+1);
!             if (e.getQualifiedName().contentEquals("jdk.incubator.mvt")) {
+                 //completion of a module with 'requires' directive will fail at this stage.
+                 ((ModuleSymbol) e).completer = Completer.NULL_COMPLETER;
+             } else {
+                 super.visitModule(e, p);
+             }
              indent(-1);
              return null;
          }
  
          @Override
< prev index next >