Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: java_lang_reflect_Method.c 8393 2007-08-22 01:10:09Z panzi $
-
*/
#include "native/include/java_lang_String.h"
#if defined(ENABLE_ANNOTATIONS)
+#include "native/include/java_util_Map.h"
#include "native/include/sun_reflect_ConstantPool.h"
#include "native/vm/reflect.h"
#endif
{
/* just to be sure */
- assert(LLNI_field_direct(this, clazz) == clazz);
+ assert(LLNI_field_direct(this, clazz) == LLNI_DIRECT(clazz));
assert(LLNI_field_direct(this, slot) == slot);
return _Jv_java_lang_reflect_Method_invoke(this, o, args);
*/
JNIEXPORT struct java_lang_Object* JNICALL Java_java_lang_reflect_Method_getDefaultValue(JNIEnv *env, struct java_lang_reflect_Method* this)
{
+ java_handle_bytearray_t *annotationDefault = NULL;
static methodinfo *m_parseAnnotationDefault = NULL;
utf *utf_parseAnnotationDefault = NULL;
utf *utf_desc = NULL;
sun_reflect_ConstantPool *constantPool = NULL;
- java_handle_t *o = (java_handle_t*)this;
java_lang_Class *constantPoolOop = NULL;
classinfo *referer = NULL;
}
}
+ LLNI_field_get_ref(this, annotationDefault, annotationDefault);
+
return (java_lang_Object*)vm_call_method(
m_parseAnnotationDefault, NULL,
- this, this->annotationDefault, constantPool);
+ this, annotationDefault, constantPool);
}
*/
JNIEXPORT struct java_util_Map* JNICALL Java_java_lang_reflect_Method_declaredAnnotations(JNIEnv *env, java_lang_reflect_Method *this)
{
- java_handle_t *o = (java_handle_t*)this;
- struct java_util_Map *declaredAnnotations = NULL;
+ java_util_Map *declaredAnnotations = NULL;
java_handle_bytearray_t *annotations = NULL;
java_lang_Class *declaringClass = NULL;
classinfo *referer = NULL;
LLNI_field_get_ref(this, declaredAnnotations, declaredAnnotations);
if (declaredAnnotations == NULL) {
- LLNI_field_get_val(this, annotations, annotations);
+ LLNI_field_get_ref(this, annotations, annotations);
LLNI_field_get_ref(this, clazz, declaringClass);
LLNI_class_get(this, referer);
declaredAnnotations = reflect_get_declaredannotatios(annotations, declaringClass, referer);
- LLNI_field_set_ref(this, declaredAnnotations, declaredAnnotations);
+ LLNI_field_set_ref(this, declaredAnnotations, (java_handle_t*) declaredAnnotations);
}
return declaredAnnotations;
*/
JNIEXPORT java_handle_objectarray_t* JNICALL Java_java_lang_reflect_Method_getParameterAnnotations(JNIEnv *env, java_lang_reflect_Method *this)
{
- java_handle_t *o = (java_handle_t*)this;
java_handle_bytearray_t *parameterAnnotations = NULL;
int32_t slot = -1;
java_lang_Class *declaringClass = NULL;