protected void methodSectionForClass(PrintWriter pw,
                                         ClassDoc clazz, String cname)
        throws ClassNotFoundException {
        String methods = methodDecls(clazz, cname);

        if (methods.length() != 0) {
            pw.println("/* Native method declarations: */" + lineSep);
            pw.println("#ifdef __cplusplus");
            pw.println("extern \"C\" {");
            pw.println("#endif" + lineSep);
            pw.println(methods);
            pw.println("#ifdef __cplusplus");
            pw.println("}");
            pw.println("#endif");
        }
    }