Patch: Class.getClasses()

Tom Tromey tromey@cygnus.com
Fri Jan 7 12:21:00 GMT 2000


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> *


More information about the Java-patches mailing list