Directory restructuring of object.h
Break object.h into constituent files.
Reduce number of #includes in other GC header files.
Introduce -inl.h files to avoid mirror files #include-ing each other.
Check invariants of verifier RegTypes for all constructors.
Change-Id: Iecf1171c02910ac152d52947330ef456df4043bc
diff --git a/src/native/java_lang_reflect_Method.cc b/src/native/java_lang_reflect_Method.cc
index b1eb6e0..14dc6a4 100644
--- a/src/native/java_lang_reflect_Method.cc
+++ b/src/native/java_lang_reflect_Method.cc
@@ -16,7 +16,12 @@
#include "class_linker.h"
#include "jni_internal.h"
-#include "object.h"
+#include "mirror/class-inl.h"
+#include "mirror/abstract_method.h"
+#include "mirror/abstract_method-inl.h"
+#include "mirror/object-inl.h"
+#include "mirror/object_array-inl.h"
+#include "mirror/proxy.h"
#include "object_utils.h"
#include "reflection.h"
#include "scoped_thread_state_change.h"
@@ -30,10 +35,10 @@
static jobject Method_getExceptionTypesNative(JNIEnv* env, jobject javaMethod) {
ScopedObjectAccess soa(env);
- AbstractMethod* proxy_method = soa.Decode<Object*>(javaMethod)->AsMethod();
+ mirror::AbstractMethod* proxy_method = soa.Decode<mirror::Object*>(javaMethod)->AsMethod();
CHECK(proxy_method->GetDeclaringClass()->IsProxyClass());
- SynthesizedProxyClass* proxy_class =
- down_cast<SynthesizedProxyClass*>(proxy_method->GetDeclaringClass());
+ mirror::SynthesizedProxyClass* proxy_class =
+ down_cast<mirror::SynthesizedProxyClass*>(proxy_method->GetDeclaringClass());
int throws_index = -1;
size_t num_virt_methods = proxy_class->NumVirtualMethods();
for (size_t i = 0; i < num_virt_methods; i++) {
@@ -43,13 +48,13 @@
}
}
CHECK_NE(throws_index, -1);
- ObjectArray<Class>* declared_exceptions = proxy_class->GetThrows()->Get(throws_index);
+ mirror::ObjectArray<mirror::Class>* declared_exceptions = proxy_class->GetThrows()->Get(throws_index);
return soa.AddLocalReference<jobject>(declared_exceptions->Clone(soa.Self()));
}
static jobject Method_findOverriddenMethodNative(JNIEnv* env, jobject javaMethod) {
ScopedObjectAccess soa(env);
- AbstractMethod* method = soa.Decode<Object*>(javaMethod)->AsMethod();
+ mirror::AbstractMethod* method = soa.Decode<mirror::Object*>(javaMethod)->AsMethod();
return soa.AddLocalReference<jobject>(method->FindOverriddenMethod());
}