code: public static Predicate<Class<?>> classIsAssignableFrom(Class<?> ancestor) {
          return candidate -> candidate != null && ancestor.isAssignableFrom(candidate);
      }
docs: Check if a candidate class is assignable to the specified class.
  
  @param ancestor the class to check for.
  @return the predicate.