code: public ClassSymbol enterClass(ModuleSymbol msym, Name name, TypeSymbol owner) {
          Assert.checkNonNull(msym);
          Name flatname = TypeSymbol.formFlatName(name, owner);
          ClassSymbol c = getClass(msym, flatname);
          if (c == null) {
              c = defineClass(name, owner);
              doEnterClass(msym, c);
          } else if ((c.name != name || c.owner != owner) && owner.kind == TYP && c.owner.kind == PCK) {
              // reassign fields of classes that might have been loaded with
              // their flat names.
              c.owner.members().remove(c);
              c.name = name;
              c.owner = owner;
              c.fullname = ClassSymbol.formFullName(name, owner);
          }
          return c;
      }
docs: Create a new toplevel or member class symbol with given name
  and owner and enter in `classes' unless already there.