docs: public Class getTopLevelClass(Class clazz) throws ClassNotPersistenceCapableException
      {
          if(m_topLevelClassTable == null)
          {
              m_topLevelClassTable = new HashMap();
          }
          // try to find an extent that contains clazz
          Class retval = (Class) m_topLevelClassTable.get(clazz);
          if (retval == null)
          {
              synchronized (extentTable)
              {
                  ClassDescriptor cld = (ClassDescriptor) extentTable.get(clazz.getName());
                  if (cld == null)
                  {
                      // walk the super-references
                      cld = getDescriptorFor(clazz).getSuperClassDescriptor();
                  }
                  
                  if (cld != null)
                  {
                      // fix by Mark Rowell
                      // Changed to call getExtentClass recursively
                      retval = getTopLevelClass(cld.getClassOfObject());
                      // if such an extent could not be found just return clazz itself.
                      if (retval == null)
                      {
                          retval = clazz;
                      }
                  }
                  else
                  {
                      // check if class is persistence capable
                      // +
                      // Adam Jenkins: use the class that is associated
                      // with the descriptor instead of the actual class
                      ClassDescriptor temp = getDescriptorFor(clazz);
                      retval = temp.getClassOfObject();
                  }
                  m_topLevelClassTable.put(clazz, retval);
              }
          }
          return retval;
      }