Add toString to Java code

* toString is mainly for debugging purposes.
* For structs and interfaces, add Object.toString.
* For enums, add MyEnum.toString(int) and MyEnum.dumpBitfield(int).

Use them as follows:
* For enums, use the static method E.toString(int).
* For bitfields, use the static method E.dumpBitfield(int).
* For all arrays, use java.utils.Arrays.deepToString(o)
* For everything else, use one of the following:
    * o.toString(), if o is not null
    * Object.toString(o)
    * String.valueOf(o)
* Note that for array / vec of enums / bitfields, the raw integer
  value is dumped.

Bug: 33459772
Test: hidl_test_java

Change-Id: Ifb1ed519770b907e0a4e345b2c3109dc322a23b2
diff --git a/ArrayType.h b/ArrayType.h
index e17df10..a0c2a08 100644
--- a/ArrayType.h
+++ b/ArrayType.h
@@ -95,6 +95,11 @@
             const std::string &parentName,
             const std::string &offsetText) const override;
 
+    void emitJavaDump(
+            Formatter &out,
+            const std::string &streamName,
+            const std::string &name) const override;
+
     bool needsEmbeddedReadWrite() const override;
     bool needsResolveReferences() const override;
     bool resultNeedsDeref() const override;