code: private static boolean hasConflictingClassName(DescriptorProto messageDesc, String name) {
      if (name.equals(messageDesc.getName())) {
        return true;
      }
      for (EnumDescriptorProto enumDesc : messageDesc.getEnumTypeList()) {
        if (name.equals(enumDesc.getName())) {
          return true;
        }
      }
      for (DescriptorProto nestedMessageDesc : messageDesc.getNestedTypeList()) {
        if (hasConflictingClassName(nestedMessageDesc, name)) {
          return true;
        }
      }
      return false;
    }
docs: Used by the other overload, descends recursively into messages.