public void generateMethods(ClassNode root, FormattedFileWriter writer)
            throws java.io.IOException {
        writer.outputLine("// methods");
        Iterator it = root.getMethods();
        while (it.hasNext() == true) {
            MethodNode node = (MethodNode) it.next();
            if (peerGenSettings.getUseInheritance() == true) {
                writer.output("virtual ");
            }
            if (peerGenSettings.getUseRichTypes() == true) {
                writer.output(node.getReturnType().getJNITypeName(peerGenSettings.getProject().getUsePartialSpec())
                        + " "
                        + node.getCPPName());
            } else {
                writer.output(node.getReturnType().getPlainJNITypeName() + " " + node.getUniqueCPPName());
            }
            writer.output("(JNIEnv* env, jobject obj");
            Iterator params = node.getParameterList();
            int currentIndex = 0;
            while (params.hasNext() == true) {
                writer.output(", ");
                ClassNode currentParam = (ClassNode) params.next();
                if (peerGenSettings.getUseRichTypes() == true) {
                    writer.output(currentParam.getJNITypeName(peerGenSettings.getProject().getUsePartialSpec()) + " p" + currentIndex++);
                } else {
                    writer.output(currentParam.getPlainJNITypeName() + " p" + currentIndex++);
                }
            }
            writer.outputLine(");");
        }

        writer.newLine(1);
    }