Collapse ART's AbstractMethod class into Executable
After the OpenJDK 8 pull there is now a common base class
for Method and Constructor that can be used instead.
Methods that are abstract on Executable but on Android
were implemented in AbstractMethod are now consistently
renamed to "{method}Internal", declared final and
given package-protected access.
For consistency with all other private, natively
implemented methods, the method getDeclaredAnnotations()
has been renamed getDeclaredAnnotationsNative().
Bug: 28666126
Bug: 31052885
Test: make test-art-host and cts run of CtsLibcoreTestCases
Change-Id: Ibfe6af6a47fe0cfffd0859ffbe58980aeb84e053
diff --git a/runtime/mirror/method.cc b/runtime/mirror/method.cc
index ef16719..71bac7e 100644
--- a/runtime/mirror/method.cc
+++ b/runtime/mirror/method.cc
@@ -56,7 +56,7 @@
DCHECK(!method->IsConstructor()) << PrettyMethod(method);
auto* ret = down_cast<Method*>(StaticClass()->AllocObject(self));
if (LIKELY(ret != nullptr)) {
- static_cast<AbstractMethod*>(ret)->
+ static_cast<Executable*>(ret)->
CreateFromArtMethod<kPointerSize, kTransactionActive>(method);
}
return ret;
@@ -108,7 +108,7 @@
DCHECK(method->IsConstructor()) << PrettyMethod(method);
auto* ret = down_cast<Constructor*>(StaticClass()->AllocObject(self));
if (LIKELY(ret != nullptr)) {
- static_cast<AbstractMethod*>(ret)->
+ static_cast<Executable*>(ret)->
CreateFromArtMethod<kPointerSize, kTransactionActive>(method);
}
return ret;