code: @Nullable
      private static JavaClass findCommonType(Set<JavaClass> classes) throws ClassNotFoundException {
          Set<JavaClass> possibleCommonTypes = new HashSet<>();
  
          boolean populate = true;
          for (JavaClass cls : classes) {
              if (cls == null) {
                  return null;
              }
  
              if (Values.SLASHED_JAVA_LANG_OBJECT.equals(cls.getClassName())) {
                  continue;
              }
  
              JavaClass[] infs = cls.getAllInterfaces();
              JavaClass[] supers = cls.getSuperClasses();
              if (populate) {
                  possibleCommonTypes.addAll(Arrays.asList(infs));
                  possibleCommonTypes.addAll(Arrays.asList(supers));
                  possibleCommonTypes.remove(Repository.lookupClass(Values.SLASHED_JAVA_LANG_OBJECT));
                  populate = false;
              } else {
                  Set<JavaClass> retain = new HashSet<>();
                  retain.addAll(Arrays.asList(infs));
                  retain.addAll(Arrays.asList(supers));
                  possibleCommonTypes.retainAll(retain);
              }
          }
  
          if (possibleCommonTypes.isEmpty()) {
              return null;
          }
  
          for (JavaClass cls : possibleCommonTypes) {
              if (cls.isInterface()) {
                  return cls;
              }
          }
          return possibleCommonTypes.iterator().next();
      }
docs: looks for a common superclass or interface for all the passed in types
  
  @param classes
  the set of classes to look for a common super class or interface
  @return the type that is the common interface or superclass (not Object, tho).
  
  @throws ClassNotFoundException
  if a superclass or superinterface of one of the class is not found