Method *Package::getMethod(const char *mtd_name) { if (!mtds->size()) return NULL; MethodList *list = mtds->get(mtd_name); MethodList::reverse_iterator it = list->rbegin(); Method *mtd = NULL; while (it != list->rend()) { mtd = *it; if (!mtd->ret) return mtd; it++; } return mtd; }