protected void generateDeclsForClass(PrintWriter pw,
                                         ClassDoc clazz, String cname)
        throws ClassNotFoundException {
        doneHandleTypes  = new Hashtable();
        /* The following handle types are predefined in "typedefs.h". Suppress
           inclusion in the output by generating them "into the blue" here. */
        genHandleType(null, "java.lang.Class");
        genHandleType(null, "java.lang.ClassLoader");
        genHandleType(null, "java.lang.Object");
        genHandleType(null, "java.lang.String");
        genHandleType(null, "java.lang.Thread");
        genHandleType(null, "java.lang.ThreadGroup");
        genHandleType(null, "java.lang.Throwable");

        pw.println("/* LLNI Header for class " + clazz.qualifiedName() + " */" + lineSep);
        pw.println("#ifndef _Included_" + cname);
        pw.println("#define _Included_" + cname);
        pw.println("#include \"typedefs.h\"");
        pw.println("#include \"llni.h\"");
        pw.println("#include \"jni.h\"" + lineSep);

        forwardDecls(pw, clazz);
        structSectionForClass(pw, clazz, cname);
        methodSectionForClass(pw, clazz, cname);
        pw.println("#endif");
    }