AW: Lookup BCEL Method for a particular java.lang.reflect.Method
| Newsgroups | gmane.comp.jakarta.bcel.devel |
|---|---|
| Message-ID | <20020612163045.LJNQ27460.mailoutvl21@[192.168.139.30]> |
> Method[] methods = bclass.getMethods();
> Method method = null;
> // HOW DO I GET THE BCEL METHOD CORRESPONDING TO
> // a java.lang.reflect.Method?
> for (int i = 0; i < methods.length; i++) {
> if (m.getName() == methods[i].getName() &&
> m.toString().equals(methods[i].toString())) {
> method = methods[i];
> break;
> }
> }
Comparing the names access flags and the method signature
should be the correct way. However, I don't know whether
reflect.Method allows to obtain the signature.
Cheers
Markus
--
berlin.de - meine stadt im netz. Jetzt eigene eMail-adresse @berlin.de sichern!
http://webmail.berlin.de