public void generateMethods(ClassNode root, FormattedFileWriter writer)
            throws java.io.IOException {
        String namespace = root.getPackageName().replace('.', '_');
        if (namespace == null || namespace.equals("") == true) {
            namespace = "Java_";
        } else {
            namespace = "Java_" + namespace + "_";
        }

        writer.outputLine("extern \"C\"");
        writer.outputLine("{");
        writer.incTabLevel();
        writer.outputLine("JNIEXPORT void JNICALL " + namespace + root.getClassName() + "Proxy_init(JNIEnv*, jclass);");
        writer.decTabLevel();
        writer.outputLine("};");
        writer.newLine(1);

        Iterator nit = root.getNamespaceElements();

        while (nit.hasNext() == true) {
            writer.output((String) nit.next() + "::");
        }
        writer.outputLine(root.getCPPClassName() + "Peer* " + namespace + root.getClassName() + "Proxy_getPeerPtr(JNIEnv*, jobject);");
        writer.outputLine("JNIEXPORT void JNICALL " + namespace + root.getClassName() + "Proxy_releasePeer(JNIEnv*, jobject);");
        writer.newLine(1);
        writer.outputLine("// methods");
        Iterator it = root.getMethods();
        while (it.hasNext() == true) {
            MethodNode node = (MethodNode) it.next();
            writer.output("JNIEXPORT ");
            writer.output(node.getReturnType().getPlainJNITypeName() + " ");
            writer.output("JNICALL " + namespace + root.getClassName() + "Proxy_");
            writer.output((peerGenSettings.getUseRichTypes() == true ? node.getCPPName() : node.getUniqueCPPName())
                    + "(JNIEnv*, jobject");
            Iterator params = node.getParameterList();
            while (params.hasNext() == true) {
                ClassNode currentParam = (ClassNode) params.next();
                writer.output(", " + currentParam.getPlainJNITypeName());
            }
            writer.outputLine(");");
        }

        writer.newLine(1);
    }