code: public static void isAssignableTo(Class<?> from, Class<?> to, Supplier<String> message) {
      if (isNotAssignableTo(from, to)) {
        throw new ClassCastException(message.get());
      }
    }
docs: Asserts that the {@link Class 'from' class type} is assignable to the {@link Class 'to' class type}.
  
  The assertion holds if and only if the {@link Class 'from' class type} is the same as or a subclass
  of the {@link Class 'to' class type}.
  
  @param from {@link Class class type} being evaluated for assignment compatibility
  with the {@link Class 'to' class type}.
  @param to {@link Class class type} used to determine if the {@link Class 'from' class type}
  is assignment compatible.
  @param message {@link String} containing the message used in the {@link ClassCastException} thrown
  if the assertion fails.
  @throws java.lang.ClassCastException if the {@link Class 'from' class type} is not assignment compatible
  with the {@link Class 'to' class type}.
  @see java.lang.Class#isAssignableFrom(Class)