Class clean-up.

Move Class code out of native and into Java.
Remove ClassLinker::FindDexFile.

Change-Id: Idd9c4563d2c32e76690675242ff491276ace9848
diff --git a/src/common_throws.cc b/src/common_throws.cc
index 7ab5614..9fb686a 100644
--- a/src/common_throws.cc
+++ b/src/common_throws.cc
@@ -61,7 +61,7 @@
 void ThrowNullPointerExceptionForMethodAccess(AbstractMethod* caller, uint32_t method_idx,
                                               InvokeType type) {
   DexCache* dex_cache = caller->GetDeclaringClass()->GetDexCache();
-  const DexFile& dex_file = Runtime::Current()->GetClassLinker()->FindDexFile(dex_cache);
+  const DexFile& dex_file = *dex_cache->GetDexFile();
   std::ostringstream msg;
   msg << "Attempt to invoke " << type << " method '"
       << PrettyMethod(method_idx, dex_file, true) << "' on a null object reference";
@@ -133,8 +133,7 @@
     default: {
       // TODO: We should have covered all the cases where we expect a NPE above, this
       //       message/logging is so we can improve any cases we've missed in the future.
-      const DexFile& dex_file = Runtime::Current()->GetClassLinker()
-          ->FindDexFile(throw_method->GetDeclaringClass()->GetDexCache());
+      const DexFile& dex_file = *throw_method->GetDeclaringClass()->GetDexCache()->GetDexFile();
       std::string message("Null pointer exception during instruction '");
       message += instr->DumpString(&dex_file);
       message += "'";
@@ -243,7 +242,7 @@
 
 void ThrowNoSuchMethodError(uint32_t method_idx, const AbstractMethod* referrer) {
   DexCache* dex_cache = referrer->GetDeclaringClass()->GetDexCache();
-  const DexFile& dex_file = Runtime::Current()->GetClassLinker()->FindDexFile(dex_cache);
+  const DexFile& dex_file = *dex_cache->GetDexFile();
   std::ostringstream msg;
   msg << "No method '" << PrettyMethod(method_idx, dex_file, true) << "'";
   AddReferrerLocation(msg, referrer);