This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
Patch: Class.getClasses()
- To: Java Patch List <java-patches at sourceware dot cygnus dot com>
- Subject: Patch: Class.getClasses()
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 07 Jan 2000 13:23:56 -0700
- Reply-To: tromey at cygnus dot com
I'm committing this patch. It implements Class.getClasses (to the
extent that we currently can). I now believe all the reflection code
exists and works correctly. On to other things.
2000-01-07 Tom Tromey <tromey@cygnus.com>
* java/lang/natClass.cc (getClasses): Wrote.
Tom
Index: java/lang/natClass.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/natClass.cc,v
retrieving revision 1.14
diff -u -r1.14 natClass.cc
--- natClass.cc 2000/01/06 18:18:15 1.14
+++ natClass.cc 2000/01/07 20:17:49
@@ -367,8 +367,11 @@
JArray<jclass> *
java::lang::Class::getClasses (void)
{
- // FIXME: implement.
- return NULL;
+ // Until we have inner classes, it always makes sense to return an
+ // empty array.
+ JArray<jclass> *result
+ = (JArray<jclass> *) JvNewObjectArray (0, &ClassClass, NULL);
+ return result;
}
JArray<jclass> *