isBinder -> isInterface.

There are two functions here which do the same thing. To make handling
interfaces in various cases clearer/easier to understand, these are
being combined.

Bug: 111320612
Test: hidl_test
Change-Id: I3ebf0ec644f73d25657632564c29243952fdd0d4
diff --git a/ArrayType.cpp b/ArrayType.cpp
index 9fdc27c..ec849bc 100644
--- a/ArrayType.cpp
+++ b/ArrayType.cpp
@@ -80,7 +80,7 @@
 status_t ArrayType::validate() const {
     CHECK(!mElementType->isArray());
 
-    if (mElementType->isBinder()) {
+    if (mElementType->isInterface()) {
         std::cerr << "ERROR: Arrays of interface types are not supported"
                   << " at " << mElementType.location() << "\n";
 
diff --git a/CompoundType.cpp b/CompoundType.cpp
index 6908317..dd0ea26 100644
--- a/CompoundType.cpp
+++ b/CompoundType.cpp
@@ -56,7 +56,7 @@
         }
 
         if (mStyle == STYLE_UNION) {
-            if (type.isBinder()) {
+            if (type.isInterface()) {
                 std::cerr << "ERROR: Union cannot contain interfaces at " << field->location()
                           << "\n";
                 return UNKNOWN_ERROR;
diff --git a/Interface.cpp b/Interface.cpp
index c02e72d..b591a9b 100644
--- a/Interface.cpp
+++ b/Interface.cpp
@@ -666,10 +666,6 @@
     return true;
 }
 
-bool Interface::isBinder() const {
-    return true;
-}
-
 const std::vector<Method *> &Interface::userDefinedMethods() const {
     return mUserMethods;
 }
diff --git a/Interface.h b/Interface.h
index 6ad09ff..aa3d18f 100644
--- a/Interface.h
+++ b/Interface.h
@@ -44,7 +44,6 @@
 
     bool isElidableType() const override;
     bool isInterface() const override;
-    bool isBinder() const override;
     bool isIBase() const { return fqName() == gIBaseFqName; }
     std::string typeName() const override;
 
diff --git a/Type.cpp b/Type.cpp
index 891b2db..256b052 100644
--- a/Type.cpp
+++ b/Type.cpp
@@ -64,10 +64,6 @@
     return false;
 }
 
-bool Type::isBinder() const {
-    return false;
-}
-
 bool Type::isNamedType() const {
     return false;
 }
diff --git a/Type.h b/Type.h
index b6ee21e..2462f56 100644
--- a/Type.h
+++ b/Type.h
@@ -42,7 +42,6 @@
     virtual ~Type();
 
     virtual bool isArray() const;
-    virtual bool isBinder() const;
     virtual bool isBitField() const;
     virtual bool isCompoundType() const;
     virtual bool isEnum() const;
diff --git a/VectorType.cpp b/VectorType.cpp
index cb7a658..f883da7 100644
--- a/VectorType.cpp
+++ b/VectorType.cpp
@@ -75,7 +75,7 @@
 }
 
 bool VectorType::isVectorOfBinders() const {
-    return mElementType->isBinder();
+    return mElementType->isInterface();
 }
 
 bool VectorType::deepCanCheckEquality(std::unordered_set<const Type*>* visited) const {