| 710 | } |
| 711 | |
| 712 | bool Object::has_method(const StringName &p_method) const { |
| 713 | if (p_method == CoreStringName(free_)) { |
| 714 | return true; |
| 715 | } |
| 716 | |
| 717 | if (script_instance && script_instance->has_method(p_method)) { |
| 718 | return true; |
| 719 | } |
| 720 | |
| 721 | MethodBind *method = ClassDB::get_method(get_class_name(), p_method); |
| 722 | if (method != nullptr) { |
| 723 | return true; |
| 724 | } |
| 725 | |
| 726 | const Script *scr = Object::cast_to<Script>(this); |
| 727 | if (scr != nullptr) { |
| 728 | return scr->has_static_method(p_method); |
| 729 | } |
| 730 | |
| 731 | return false; |
| 732 | } |
| 733 | |
| 734 | int Object::_get_method_argument_count_bind(const StringName &p_method) const { |
| 735 | return get_method_argument_count(p_method); |