private static boolean checkSubClasses(Class<?> candidate, List<Class<?>> selectors) {
    boolean ret = false;
    LOGGER.debug("Checking interfaces for: [{}]", candidate);
    List interfaces = ClassUtils.getAllInterfaces(candidate);

    for (Class selectorItf : selectors) {
      if (interfaces.contains(selectorItf)) {
        LOGGER.debug("Checking candidate for subclassing interface: ", selectorItf);
        if (selectorItf.getClass().isAssignableFrom(candidate.getClass())) {
          ret = true;
          break;
        }
      }
    }
    return ret;
  }
Checks if the candidate implements interfaces listed in the selection criteria

@param candidate the type to be checked
@return true if the candidate implements interfaces listed in the selection criteria, false otherwise
ambari-server/src/main/java/org/apache/ambari/server/cleanup/ClasspathScannerUtils.java