Signed-off-by: Tomek Grabiec <tgrab...@gmail.com> --- vm/jato.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/vm/jato.c b/vm/jato.c index 49749d2..34f453a 100644 --- a/vm/jato.c +++ b/vm/jato.c @@ -535,6 +535,22 @@ static jint native_vmclass_getmodifiers(struct vm_object *clazz) } static struct vm_object * +native_vmclass_getcomponenttype(struct vm_object *object) +{ + struct vm_class *class; + + class = vm_class_get_class_from_class_object(object); + assert(class != NULL); + + if (!vm_class_is_array_class(class)) { + warn("%s", class->name); + return NULL; + } + + return vm_class_get_array_element_class(class)->object; +} + +static struct vm_object * native_vmclassloader_getprimitiveclass(int type) { char primitive_class_name[] = { "X" }; @@ -645,6 +661,7 @@ static struct vm_native natives[] = { DEFINE_NATIVE("java/lang/VMClass", "isArray", &native_vmclass_isarray), DEFINE_NATIVE("java/lang/VMClass", "isPrimitive", &native_vmclass_isprimitive), DEFINE_NATIVE("java/lang/VMClass", "getModifiers", &native_vmclass_getmodifiers), + DEFINE_NATIVE("java/lang/VMClass", "getComponentType", &native_vmclass_getcomponenttype), DEFINE_NATIVE("java/lang/VMClassLoader", "getPrimitiveClass", &native_vmclassloader_getprimitiveclass), DEFINE_NATIVE("java/io/VMFile", "isDirectory", &native_vmfile_is_directory), DEFINE_NATIVE("java/lang/VMObject", "clone", &native_vmobject_clone), -- 1.6.0.6 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel