public static CtClass getSuperclass(CtClass c) throws CompileError {
        try {
            CtClass sc = c.getSuperclass();
            if (sc != null)
                return sc;
        }
        catch (NotFoundException e) {}
        throw new CompileError("cannot find the super class of "
                               + c.getName());
    }