Refactor top-level AST nodes v2

The previous version of this patch was tainted by parts of another
change to remove a memory leak, and ended up trying to treat a bare
pointer like a unique_ptr in a few places. This combines both changes in
to one.

Previous patch was b696437d842d59c0cc26411fa3d71cb91897c572:

We now return an AidlDocument from parsing. This type is non-polymorphic
and contains either a vector of parcelables or an interface. This gets
rid of all of our reinterpret_cast calls and the public item_type field.

Change-Id: I77fbb1d8448343bd02484d896289a514d636df25
Test: Unit tests pass
Bug: none
Signed-off-by: Casey Dahlin <sadmac@google.com>
diff --git a/generate_java.cpp b/generate_java.cpp
index 55fa791..b6054c8 100644
--- a/generate_java.cpp
+++ b/generate_java.cpp
@@ -52,11 +52,7 @@
                 AidlInterface* iface, JavaTypeNamespace* types,
                 const IoDelegate& io_delegate)
 {
-    Class* cl;
-
-    if (iface->item_type == INTERFACE_TYPE_BINDER) {
-        cl = generate_binder_interface_class(iface, types);
-    }
+    Class* cl = generate_binder_interface_class(iface, types);
 
     Document* document = new Document;
         document->comment = "";