public void generateMethods(ClassNode root, FormattedFileWriter writer)
            throws java.io.IOException {
        writer.outputLine("// methods");
        Iterator it = root.getMethods();
        while (it.hasNext() == true) {
            int currentIndex = 0;
            MethodNode node = (MethodNode) it.next();
            if (peerGenSettings.getUseRichTypes() == true) {
                writer.output(node.getReturnType().getJNITypeName(peerGenSettings.getProject().getUsePartialSpec())
                        + " "
                        + root.getCPPClassName()
                        + "Peer::"
                        + node.getCPPName());
            } else {
                writer.output(node.getReturnType().getPlainJNITypeName()
                        + " "
                        + root.getCPPClassName()
                        + "Peer::"
                        + node.getUniqueCPPName());
            }
            writer.output("(JNIEnv* env, jobject obj");
            Iterator params = node.getParameterList();
            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.outputLine("{");
            writer.incTabLevel();
            if (peerGenSettings.getUseInheritance() == false) {
                writer.outputLine("// TODO: Fill in your implementation here");
            } else {
                if (node.getReturnType().getPlainJNITypeName().equals("void") == false) {
                    writer.outputLine("return "
                            + (node.getReturnType().isPrimitive() == true ? "static_cast" : "reinterpret_cast")
                            + "<" + node.getReturnType().getPlainJNITypeName() + ">( 0 );");
                }
            }
            writer.decTabLevel();
            writer.outputLine("}");
            writer.newLine(1);
        }
    }