The API spec says we shouldn't do so. Signed-off-by: Tomek Grabiec <tgrab...@gmail.com> --- include/vm/method.h | 5 +++++ vm/reflection.c | 6 +++++- 2 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/include/vm/method.h b/include/vm/method.h index ccf1db8..7c9e0d7 100644 --- a/include/vm/method.h +++ b/include/vm/method.h @@ -119,6 +119,11 @@ static inline bool vm_method_is_vm_native(struct vm_method *vmm) && vmm->is_vm_native; } +static inline bool vm_method_is_special(struct vm_method *vmm) +{ + return vmm->name[0] == '<'; +} + static inline enum vm_type method_return_type(struct vm_method *method) { char *return_type = index(method->type, ')') + 1; diff --git a/vm/reflection.c b/vm/reflection.c index d0bff58..676a332 100644 --- a/vm/reflection.c +++ b/vm/reflection.c @@ -189,7 +189,8 @@ native_vmclass_get_declared_methods(struct vm_object *clazz, for (int i = 0; i < vmc->class->methods_count; i++) { struct vm_method *vmm = &vmc->methods[i]; - if (vm_method_is_public(vmm)) + if (vm_method_is_public(vmm) && + !vm_method_is_special(vmm)) count ++; } } else { @@ -212,6 +213,9 @@ native_vmclass_get_declared_methods(struct vm_object *clazz, if (public_only && !vm_method_is_public(vmm)) continue; + if (vm_method_is_special(vmm)) + continue; + struct vm_object *method = vm_object_alloc(vm_java_lang_reflect_Method); -- 1.6.0.4 ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel