Use TypeNamespace instances in aidl.cpp
Refactor much of the logic around types into an instance of
TypeNamespace. This class defines an interface to type reasoning
logic that aidl.cpp can use to register binder and parcelable types
it loads during parsing. Code generation can use a language specific
subclass of the type namespace to reason about types more specifically.
For now, leave NAMES and the global type constants intact. We'll
refactor those in a separate change if necessary.
Bug: 24303749
Test: Compiles, unittests pass
Change-Id: Ie56a89159c956c587a1ff3e45d38d1850b04a9f2
diff --git a/generate_java_binder.cpp b/generate_java_binder.cpp
index f44254f..3127e8b 100644
--- a/generate_java_binder.cpp
+++ b/generate_java_binder.cpp
@@ -520,7 +520,8 @@
}
Class*
-generate_binder_interface_class(const interface_type* iface)
+generate_binder_interface_class(const interface_type* iface,
+ JavaTypeNamespace* types)
{
const InterfaceType* interfaceType = static_cast<const InterfaceType*>(
NAMES.Find(iface->package, iface->name.data));