code: private Set<String> getClasses(String name, ClassLoader cl)
     {
        Set<String> result = new HashSet<String>();
        
        try
        {
           Class<?> clz = Class.forName(name, true, cl);
           while (!Object.class.equals(clz))
           {
              result.add(clz.getName());
              clz = clz.getSuperclass();
           }
        }
        catch (Throwable t)
        {
           log.debugf("Couldn't load: %s", name);
        }
  
        return result;
     }
docs: Get the class names for a class and all of its super classes
  @param name The name of the class
  @param cl The class loader
  @return The set of class names