fprintf(state->file, " %s(", IDL_IDENT(method->ident).str);
fprintf(state->file, " %c%s(", tolower(method_name[0]), method_name + 1);
method_declaration(TreeState *state) {    /* IDL_tree method_tree = state->tree; */    struct _IDL_OP_DCL *method = &IDL_OP_DCL(state->tree);    gboolean method_notxpcom =         (IDL_tree_property_get(method->ident, "notxpcom") != NULL);    gboolean method_noscript =         (IDL_tree_property_get(method->ident, "noscript") != NULL);    IDL_tree iterator = NULL;    IDL_tree retval_param = NULL;    if (!verify_method_declaration(state->tree))        return FALSE;    xpidl_write_comment(state, 4);    /*     * Write beginning of method declaration     */    fputs("    ", state->file);    if (!method_noscript) {        /* Nonscriptable methods become package-protected */        fputs("public ", state->file);    }    /*     * Write return type     * Unlike C++ headers, Java interfaces return the declared      * return value; an exception indicates XPCOM method failure.     */    if (method_notxpcom || method->op_type_spec) {        state->tree = method->op_type_spec;        if (!xpcom_to_java_type(state)) {            return FALSE;        }    } else {        /* Check for retval attribute */        for (iterator = method->parameter_dcls; iterator != NULL;              iterator = IDL_LIST(iterator).next) {            IDL_tree original_tree = state->tree;            state->tree = IDL_LIST(iterator).data;            if (IDL_tree_property_get(IDL_PARAM_DCL(state->tree).simple_declarator,                                       "retval")) {                retval_param = iterator;                state->tree = IDL_PARAM_DCL(state->tree).param_type_spec;                /*                 * Put in type of parameter                 */                if (!xpcom_to_java_type(state)) {                    return FALSE;                }            }            state->tree = original_tree;        }        if (retval_param == NULL) {            fputs("void", state->file);        }    }     /*     * Write method name     */    fprintf(state->file, " %s(", IDL_IDENT(method->ident).str);    /*     * Write parameters     */    for (iterator = method->parameter_dcls; iterator != NULL;          iterator = IDL_LIST(iterator).next) {        /* Skip "retval" */        if (iterator == retval_param) {            continue;        }        if (iterator != method->parameter_dcls) {            fputs(", ", state->file);        }                state->tree = IDL_LIST(iterator).data;        if (!xpcom_to_java_param(state)) {            return FALSE;        }    }    fputs(")", state->file);    if (method->raises_expr) {        IDL_tree iter = method->raises_expr;        IDL_tree dataNode = IDL_LIST(iter).data;        fputs(" throws ", state->file);        fputs(IDL_IDENT(dataNode).str, state->file);        iter = IDL_LIST(iter).next;        while (iter) {            dataNode = IDL_LIST(iter).data;            fprintf(state->file, ", %s", IDL_IDENT(dataNode).str);            iter = IDL_LIST(iter).next;        }    }    fputs(";\n", state->file);    return TRUE;    }