Validate upfront that an interface is compatible with our Java backend,

emit diagnostics if it is not. Also cleans up all other error messages to
clearly indicate an error condition.

Bug: 30876839
Change-Id: I18bcd723107ab93abcad38c976f3c38dda60a743
diff --git a/CompoundType.cpp b/CompoundType.cpp
index 51bb4cf..0504022 100644
--- a/CompoundType.cpp
+++ b/CompoundType.cpp
@@ -19,7 +19,7 @@
 
         if (type.isInterface()) {
             fprintf(stderr,
-                    "Structs/Unions must not contain references to "
+                    "ERROR: Structs/Unions must not contain references to "
                     "interfaces.\n");
 
             return false;
@@ -30,7 +30,8 @@
                 // Can't have those in a union.
 
                 fprintf(stderr,
-                        "Unions must not contain any types that need fixup.\n");
+                        "ERROR: Unions must not contain any types that need "
+                        "fixup.\n");
 
                 return false;
             }
@@ -348,6 +349,10 @@
     return OK;
 }
 
+bool CompoundType::isJavaCompatible() const {
+    return false;
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 
 CompoundField::CompoundField(const char *name, Type *type)