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/mirror/object.h b/runtime/mirror/object.h
index a40c906..28a91dd 100644
--- a/runtime/mirror/object.h
+++ b/runtime/mirror/object.h
@@ -31,10 +31,10 @@
namespace mirror {
-class AbstractMethod;
+class ArtField;
+class ArtMethod;
class Array;
class Class;
-class Field;
template<class T> class ObjectArray;
template<class T> class PrimitiveArray;
typedef PrimitiveArray<uint8_t> BooleanArray;
@@ -144,17 +144,17 @@
Throwable* AsThrowable() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- bool IsMethod() const;
+ bool IsArtMethod() const;
- AbstractMethod* AsMethod();
+ ArtMethod* AsArtMethod();
- const AbstractMethod* AsMethod() const;
+ const ArtMethod* AsArtMethod() const;
- bool IsField() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ bool IsArtField() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- Field* AsField() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ ArtField* AsArtField() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
- const Field* AsField() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ const ArtField* AsArtField() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
bool IsReferenceInstance() const;