Use Java strings for Method's name.

Change-Id: Ibf0a847358a1b480069f49a0aefc783ad96a0332
diff --git a/src/object.cc b/src/object.cc
index 69b093d..96c5116 100644
--- a/src/object.cc
+++ b/src/object.cc
@@ -157,11 +157,11 @@
   return ShortyCharToSize(shorty_[0]);
 }
 
-Method* Class::FindDirectMethod(const StringPiece& name) const {
+Method* Class::FindDirectMethod(const String* name) const {
   Method* result = NULL;
   for (size_t i = 0; i < NumDirectMethods(); i++) {
     Method* method = GetDirectMethod(i);
-    if (method->GetName().compare(name) == 0) {
+    if (String::Equals(method->GetName(), name)) {
       result = method;
       break;
     }
@@ -169,11 +169,11 @@
   return result;
 }
 
-Method* Class::FindVirtualMethod(const StringPiece& name) const {
+Method* Class::FindVirtualMethod(const String* name) const {
   Method* result = NULL;
   for (size_t i = 0; i < NumVirtualMethods(); i++) {
     Method* method = GetVirtualMethod(i);
-    if (method->GetName().compare(name) == 0) {
+    if (String::Equals(method->GetName(), name)) {
       result = method;
       break;
     }
@@ -186,6 +186,15 @@
   return NULL;  // TODO
 }
 
+// TODO: get global references for these
+Class* String::java_lang_String_ = NULL;
+Class* String::char_array_ = NULL;
+
+void String::InitClasses(Class* java_lang_String, Class* char_array) {
+  java_lang_String_ = java_lang_String;
+  char_array_ = char_array;
+}
+
 static const char* kClassStatusNames[] = {
   "Error",
   "NotReady",