Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: reflect.c 8322 2007-08-16 15:54:38Z twisti $
-
*/
#include "native/include/java_lang_reflect_Field.h"
#include "native/include/java_lang_reflect_Method.h"
-#include "native/vm/java_lang_String.h"
#include "native/vm/reflect.h"
#include "vm/builtin.h"
/* get declaring class */
- c = (classinfo *) m->class;
+ c = m->class;
/* allocate a new object */
/* get declaring class */
- c = (classinfo *) f->class;
+ c = f->class;
/* allocate a new object */
/* The name needs to be interned */
/* XXX implement me better! */
- LLNI_field_set_ref(rf, name , _Jv_java_lang_String_intern((java_lang_String *) javastring_new(f->name)));
+ LLNI_field_set_ref(rf, name , javastring_intern((java_lang_String *) javastring_new(f->name)));
LLNI_field_set_val(rf, slot , slot);
LLNI_field_set_ref(rf, annotations , field_get_annotations(f));
/* The name needs to be interned */
/* XXX implement me better! */
- LLNI_field_set_ref(rf, name , _Jv_java_lang_String_intern((java_lang_String *) javastring_new(f->name)));
+ LLNI_field_set_ref(rf, name , javastring_intern((java_lang_String *) javastring_new(f->name)));
LLNI_field_set_cls(rf, type , (java_lang_Class *) field_get_type(f));
LLNI_field_set_val(rf, modifiers , f->flags);
LLNI_field_set_val(rf, slot , slot);
/* get declaring class */
- c = (classinfo *) m->class;
+ c = m->class;
/* allocate a new object */
/* The name needs to be interned */
/* XXX implement me better! */
- LLNI_field_set_ref(rm, name , _Jv_java_lang_String_intern((java_lang_String *) javastring_new(m->name)));
+ LLNI_field_set_ref(rm, name , javastring_intern((java_lang_String *) javastring_new(m->name)));
LLNI_field_set_val(rm, slot , slot);
LLNI_field_set_ref(rm, annotations , method_get_annotations(m));
LLNI_field_set_ref(rm, parameterAnnotations, method_get_parameterannotations(m));
/* The name needs to be interned */
/* XXX implement me better! */
- LLNI_field_set_ref(rm, name , _Jv_java_lang_String_intern((java_lang_String *) javastring_new(m->name)));
+ LLNI_field_set_ref(rm, name , javastring_intern((java_lang_String *) javastring_new(m->name)));
LLNI_field_set_ref(rm, parameterTypes , method_get_parametertypearray(m));
LLNI_field_set_cls(rm, returnType , (java_lang_Class *) method_returntype_get(m));
LLNI_field_set_ref(rm, exceptionTypes , method_get_exceptionarray(m));
#if defined(WITH_CLASSPATH_GNU) && defined(ENABLE_ANNOTATIONS)
/* reflect_get_declaredannotatios *********************************************
- Returns a java.util.Map<Class, Annotation> of the declared
- annotations.
+ Returns a java.util.Map<Class<? extends Annotation>, Annotation>
+ of the declared annotations.
*******************************************************************************/
/* get parameter count */
- c = (classinfo *)declaringClass;
+ c = LLNI_classinfo_unwrap(declaringClass);
m = &(c->methods[slot]);
numParameters = method_get_parametercount(m);