Turn off the 'public' check for main, and improve diagnostics.

We're likely to be able to invoke a static main method before we can invoke
a virtual getModifiers, and right now we don't care whether we've been asked
to run a non-public main.

Also adds PrettyMethod for improved diagnostics.

Change-Id: Iea08f0be980386adbe408b476449c2066c4e6da8
diff --git a/src/utils.cc b/src/utils.cc
index 058ca83..67d5780 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -54,6 +54,22 @@
   return result;
 }
 
+std::string PrettyMethod(const Method* m, bool with_signature) {
+  if (m == NULL) {
+    return "null";
+  }
+  Class* c = m->GetDeclaringClass();
+  std::string result(PrettyDescriptor(c->GetDescriptor()->ToModifiedUtf8()));
+  result += '.';
+  result += m->GetName()->ToModifiedUtf8();
+  if (with_signature) {
+    // TODO: iterate over the signature's elements and pass them all to
+    // PrettyDescriptor? We'd need to pull out the return type specially, too.
+    result += m->GetSignature()->ToModifiedUtf8();
+  }
+  return result;
+}
+
 std::string PrettyType(const Object* obj) {
   if (obj == NULL) {
     return "null";