+#if defined(ENABLE_ANNOTATIONS)
+/*
+ * Class: java/lang/reflect/Method
+ * Method: getDefaultValue
+ * Signature: ()Ljava/lang/Object;
+ */
+JNIEXPORT struct java_lang_Object* JNICALL Java_java_lang_reflect_Method_getDefaultValue(JNIEnv *env, struct java_lang_reflect_Method* this)
+{
+ static methodinfo *m_parseAnnotationDefault = NULL;
+ utf *utf_parseAnnotationDefault = NULL;
+ utf *utf_desc = NULL;
+ sun_reflect_ConstantPool *constantPool = NULL;
+ java_objectheader *o = (java_objectheader*)this;
+
+ if (this == NULL) {
+ exceptions_throw_nullpointerexception();
+ return NULL;
+ }
+
+ constantPool =
+ (sun_reflect_ConstantPool*)native_new_and_init(
+ class_sun_reflect_ConstantPool);
+
+ if(constantPool == NULL) {
+ /* out of memory */
+ return NULL;
+ }
+
+ constantPool->constantPoolOop = (java_lang_Object*)this->clazz;
+
+ /* only resolve the method the first time */
+ if (m_parseAnnotationDefault == NULL) {
+ utf_parseAnnotationDefault = utf_new_char("parseAnnotationDefault");
+ utf_desc = utf_new_char(
+ "(Ljava/lang/reflect/Method;[BLsun/reflect/ConstantPool;)"
+ "Ljava/lang/Object;");
+
+ if (utf_parseAnnotationDefault == NULL || utf_desc == NULL) {
+ /* out of memory */
+ return NULL;
+ }
+
+ m_parseAnnotationDefault = class_resolveclassmethod(
+ class_sun_reflect_annotation_AnnotationParser,
+ utf_parseAnnotationDefault,
+ utf_desc,
+ o->vftbl->class,
+ true);
+
+ if (m_parseAnnotationDefault == NULL)
+ {
+ /* method not found */
+ return NULL;
+ }
+ }
+
+ return (java_lang_Object*)vm_call_method(
+ m_parseAnnotationDefault, NULL,
+ this, this->annotationDefault, constantPool);
+}
+
+
+/*
+ * Class: java/lang/reflect/Method
+ * Method: declaredAnnotations
+ * Signature: ()Ljava/util/Map;
+ */
+JNIEXPORT struct java_util_Map* JNICALL Java_java_lang_reflect_Method_declaredAnnotations(JNIEnv *env, struct java_lang_reflect_Method* this)
+{
+ java_objectheader *o = (java_objectheader*)this;
+
+ if (this == NULL) {
+ exceptions_throw_nullpointerexception();
+ return NULL;
+ }
+
+ return reflect_get_declaredannotatios(&(this->declaredAnnotations), this->annotations, this->clazz, o->vftbl->class);
+}
+
+
+/*
+ * Class: java/lang/reflect/Method
+ * Method: getParameterAnnotations
+ * Signature: ()[[Ljava/lang/annotation/Annotation;
+ */
+JNIEXPORT java_objectarray* JNICALL Java_java_lang_reflect_Method_getParameterAnnotations(JNIEnv *env, struct java_lang_reflect_Method* this)
+{
+ java_objectheader *o = (java_objectheader*)this;
+
+ if (this == NULL) {
+ exceptions_throw_nullpointerexception();
+ return NULL;
+ }
+
+ return reflect_get_parameterannotations((java_objectheader*)this->parameterAnnotations, this->slot, this->clazz, o->vftbl->class);
+}
+#endif
+