ART: Add GetClassLoaderClasses

Add support for GetClassLoaderClasses, extracting all classes a
given classloader initiated. Add test.

Bug: 31684578
Test: m test-art-host-run-test-912-classes
Change-Id: I0aba27fb1674baf1263c0a19dc2dcce7af013760
diff --git a/runtime/class_linker.h b/runtime/class_linker.h
index 580acb7..cad674e 100644
--- a/runtime/class_linker.h
+++ b/runtime/class_linker.h
@@ -645,6 +645,10 @@
   mirror::Class* GetHoldingClassOfCopiedMethod(ArtMethod* method)
       REQUIRES_SHARED(Locks::mutator_lock_);
 
+  // Returns null if not found.
+  ClassTable* ClassTableForClassLoader(ObjPtr<mirror::ClassLoader> class_loader)
+      REQUIRES_SHARED(Locks::mutator_lock_);
+
   struct DexCacheData {
     // Weak root to the DexCache. Note: Do not decode this unnecessarily or else class unloading may
     // not work properly.
@@ -1039,10 +1043,6 @@
       REQUIRES_SHARED(Locks::mutator_lock_)
       REQUIRES(Locks::classlinker_classes_lock_);
 
-  // Returns null if not found.
-  ClassTable* ClassTableForClassLoader(ObjPtr<mirror::ClassLoader> class_loader)
-      REQUIRES_SHARED(Locks::mutator_lock_);
-
   // Insert a new class table if not found.
   ClassTable* InsertClassTableForClassLoader(ObjPtr<mirror::ClassLoader> class_loader)
       REQUIRES_SHARED(Locks::mutator_lock_)