* src/lib/gnu/java/lang/reflect/Method.java
authorpanzi <none@none>
Mon, 6 Aug 2007 12:44:01 +0000 (12:44 +0000)
committerpanzi <none@none>
Mon, 6 Aug 2007 12:44:01 +0000 (12:44 +0000)
commitfdb01fe8d0cb6f891ee51ed82da1f0ee725ea9ca
tree18d34460f2ae0e1dda6951a281b83861cc0162df
parente9c8e76db6bca3b164509df89a41dec9fc6538b0
* src/lib/gnu/java/lang/reflect/Method.java
(java.lang.annotation.Annotation): Added import.
(java.util.Map): Added import.
(sun.refelct.annotation.AnnotationParser): Added import.
(declaredAnnotations): Added field (inspired by OpenJDK).
(getAnnotation): Added method.
(getDeclaredAnnotations): Added method.
(declaredAnnotations): Added method (inspired by OpenJDK).
(getParameterAnnotations): Added method.

* src/lib/gnu/java/lang/reflect/Field.java
(java.lang.annotation.Annotation): Added import.
(java.util.Map): Added import.
(sun.refelct.annotation.AnnotationParser): Added import.
(declaredAnnotations): Added field (inspired by OpenJDK).
(getAnnotation): Added method.
(getDeclaredAnnotations): Added method.
(declaredAnnotations): Added method (inspired by OpenJDK).

* src/lib/gnu/java/lang/reflect/Constructor.java:
Copied file from GNU Classpath.
(java.lang.annotation.Annotation): Added import.
(java.util.Map): Added import.
(sun.refelct.annotation.AnnotationParser): Added import.
(declaredAnnotations): Added field (inspired by OpenJDK).
(getAnnotation): Added method.
(getDeclaredAnnotations): Added method.
(declaredAnnotations): Added method (inspired by OpenJDK).
(getParameterAnnotations): Added method.

* src/lib/gnu/sun/reflect/generics/parser/SignatureFormatError.java:
Removed.

* src/lib/gnu/sun/reflect/generics/parser/SignatureParser.java:
Removed. I figured out which class of GNU Classpath to use to replace
this self written class.

* src/lib/gnu/sun/reflect/annotation/AnnotationParser.java:
Added a few comments.
(sun.reflect.generics.parser.SignatureParser): Removed import.
(sun.reflect.generics.parser.SignatureFormatError): Removed import.
(gnu.java.lang.reflect.FieldSignatureParser): Added import.
(parseParameterAnnotations): Added method.
(parseSig): Changed method so it uses GNU Classpaths FieldSignatureParser.

* src/lib/Makefile.am
(VM_JAVA_FILES): Added $(top_srcdir)/src/lib/gnu/java/lang/reflect/Constructor.java
(VM_CLASS_FILES): Added classes/java/lang/reflect/Constructor.class

* src/native/vm/java_lang_Class.c
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS]
(_Jv_java_lang_Class_getDeclaredAnnotations): Cache methodinfo for
sun.reflect.annotation.AnnotationParser.parseAnnotationsIntoArray.

* src/native/vm/gnu/java_lang_reflect_Method.c
[ENABLE_ANNOTATIONS] (native/vm/reflect.h): Added include.
[ENABLE_ANNOTATIONS] (declaredAnnotations): Added method.
[ENABLE_ANNOTATIONS] (getParameterAnnotations): Added method.
[ENABLE_ANNOTATIONS] (Java_java_lang_reflect_Method_getDefaultValue):
Cache methodinfo for sun.reflect.annotation.AnnotationParser.parseDefaultValue.
[ENABLE_ANNOTATIONS] (Java_java_lang_reflect_Method_declaredAnnotations): Added.
[ENABLE_ANNOTATIONS] (Java_java_lang_reflect_Method_getParameterAnnotations): Added.

* src/native/vm/gnu/java_lang_reflect_Field.c
[ENABLE_ANNOTATIONS] (native/include/sun_reflect_ConstantPool.h): Added include.
[ENABLE_ANNOTATIONS] (native/vm/reflect.h): Added include.
[ENABLE_ANNOTATIONS] (declaredAnnotations): Added method.
[ENABLE_ANNOTATIONS] (Java_java_lang_reflect_Field_declaredAnnotations): Added.

* src/native/vm/gnu/java_lang_reflect_Constructor.c
[ENABLE_ANNOTATIONS] (vm/vm.h): Added include.
[ENABLE_ANNOTATIONS] (native/include/sun_reflect_ConstantPool.h): Added include.
[ENABLE_ANNOTATIONS] (native/vm/reflect.h): Added include.
[ENABLE_ANNOTATIONS] (declaredAnnotations): Added method.
[ENABLE_ANNOTATIONS] (getParameterAnnotations): Added method.
[ENABLE_ANNOTATIONS] (Java_java_lang_reflect_Constructor_declaredAnnotations): Added.
[ENABLE_ANNOTATIONS] (Java_java_lang_reflect_Constructor_getParameterAnnotations): Added.

* src/native/vm/reflect.c
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS] (vm/vm.h): Added include.
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS] (native/include/sun_reflect_ConstantPool.h): Added include.
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS] (reflect_get_declaredannotatios): Added.
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS] (reflect_get_parameterannotations): Added.

* src/native/vm/reflect.h
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS] (reflect_get_declaredannotatios): Added.
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS] (reflect_get_parameterannotations): Added.

* src/native/vm/sun/jvm.c
(JVM_GetDeclaredClasses): Implemented (needed by a testcase of mine).

* src/vmcore/method.c (method_get_parametercount): Added.
This function gets the parameter count of a method (not counting the
this pointer of non-static methods). Returns -1 in case of an error.

* src/vmcore/method.h (method_get_parametercount): Added.
17 files changed:
src/lib/Makefile.am
src/lib/gnu/java/lang/reflect/Constructor.java [new file with mode: 0644]
src/lib/gnu/java/lang/reflect/Field.java
src/lib/gnu/java/lang/reflect/Method.java
src/lib/gnu/sun/reflect/annotation/AnnotationParser.java
src/lib/gnu/sun/reflect/generics/parser/SignatureFormatError.java [deleted file]
src/lib/gnu/sun/reflect/generics/parser/SignatureParser.java [deleted file]
src/native/vm/gnu/java_lang_reflect_Constructor.c
src/native/vm/gnu/java_lang_reflect_Field.c
src/native/vm/gnu/java_lang_reflect_Method.c
src/native/vm/java_lang_Class.c
src/native/vm/reflect.c
src/native/vm/reflect.h
src/native/vm/sun/jvm.c
src/vmcore/annotation.c
src/vmcore/method.c
src/vmcore/method.h