< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java

Print this page
*** 43,10 ***
--- 43,11 ---
  import com.sun.tools.javac.code.Symbol.ModuleSymbol;
  import com.sun.tools.javac.code.Symbol.PackageSymbol;
  import com.sun.tools.javac.code.Symbol.RootPackageSymbol;
  import com.sun.tools.javac.code.Symbol.TypeSymbol;
  import com.sun.tools.javac.code.Symbol.VarSymbol;
+ import com.sun.tools.javac.code.Type.ArrayType;
  import com.sun.tools.javac.code.Type.BottomType;
  import com.sun.tools.javac.code.Type.ClassType;
  import com.sun.tools.javac.code.Type.ErrorType;
  import com.sun.tools.javac.code.Type.JCPrimitiveType;
  import com.sun.tools.javac.code.Type.JCVoidType;

*** 325,10 ***
--- 326,22 ---
       */
      private Type enterClass(String s) {
          return enterClass(java_base, names.fromString(s)).type;
      }
  
+     /** Enter a class into symbol table.
+      *  @param s The name of the class.
+      */
+     public Type enterClass(ModuleSymbol moduleSymbol, String s) {
+         try {
+             return enterClass(moduleSymbol, names.fromString(s)).type;
+         } catch (Throwable ex) {
+             ex.printStackTrace();
+             return Type.noType;
+         }
+     }
+ 
      public void synthesizeEmptyInterfaceIfMissing(final Type type) {
          final Completer completer = type.tsym.completer;
          type.tsym.completer = new Completer() {
              @Override
              public void complete(Symbol sym) throws CompletionFailure {
< prev index next >