Method Class::findMethod(string name, string vsig, string rsig, int static_) { Method m; if (!this->valid) { Method m; m.init(this->jvm, "can't call find method for invalid class"); return m; } m.jvm = this->jvm; m.cls = *this; m.name = name; m.vsig = vsig; m.rsig = rsig; m.static_ = static_; string sig_ = "(" + vsig + ")" + rsig; if (static_) { m.mid = this->jvm->env_->GetStaticMethodID(this->cls, name.c_str(), sig_.c_str()); } else { m.mid = this->jvm->env_->GetMethodID(this->cls, name.c_str(), sig_.c_str()); } if (m.mid) { m.init(this->jvm, ""); } else { m.init(this->jvm, "method(" + m.name + ") not found by sig:" + sig_); } return m; }