Refactor java.lang.reflect implementation

Cherry-picked from commit ed41d5c44299ec5d44b8514f6e17f802f48094d1.

Move to ArtMethod/Field instead of AbstractMethod/Field and have
java.lang.reflect APIs delegate to ArtMethod/ArtField.

Bug: 10014286.

Change-Id: Iafc1d8c5b62562c9af8fb9fd8c5e1d61270536e7
diff --git a/runtime/hprof/hprof.cc b/runtime/hprof/hprof.cc
index d3bb2e8..0b2e741 100644
--- a/runtime/hprof/hprof.cc
+++ b/runtime/hprof/hprof.cc
@@ -48,10 +48,9 @@
 #include "gc/heap.h"
 #include "gc/space/space.h"
 #include "globals.h"
+#include "mirror/art_field-inl.h"
 #include "mirror/class.h"
 #include "mirror/class-inl.h"
-#include "mirror/field.h"
-#include "mirror/field-inl.h"
 #include "mirror/object-inl.h"
 #include "object_utils.h"
 #include "os.h"
@@ -922,7 +921,7 @@
         rec->AddId(CLASS_STATICS_ID(obj));
 
         for (size_t i = 0; i < sFieldCount; ++i) {
-          mirror::Field* f = thisClass->GetStaticField(i);
+          mirror::ArtField* f = thisClass->GetStaticField(i);
           fh.ChangeField(f);
 
           size_t size;
@@ -947,7 +946,7 @@
       int iFieldCount = thisClass->IsObjectClass() ? 0 : thisClass->NumInstanceFields();
       rec->AddU2((uint16_t)iFieldCount);
       for (int i = 0; i < iFieldCount; ++i) {
-        mirror::Field* f = thisClass->GetInstanceField(i);
+        mirror::ArtField* f = thisClass->GetInstanceField(i);
         fh.ChangeField(f);
         HprofBasicType t = SignatureToBasicTypeAndSize(fh.GetTypeDescriptor(), NULL);
         rec->AddId(LookupStringId(fh.GetName()));
@@ -1010,7 +1009,7 @@
       while (!sclass->IsObjectClass()) {
         int ifieldCount = sclass->NumInstanceFields();
         for (int i = 0; i < ifieldCount; ++i) {
-          mirror::Field* f = sclass->GetInstanceField(i);
+          mirror::ArtField* f = sclass->GetInstanceField(i);
           fh.ChangeField(f);
           size_t size;
           SignatureToBasicTypeAndSize(fh.GetTypeDescriptor(), &size);