code: @SuppressWarnings("unchecked")
       static <E> List<E> dynamicallyCastList(List<?> list, Class<E> type) {
          return dynamicallyCastCollection(list, type, List.class);
      }
docs: Dynamically check that the members of the list are all instances of
  the given type (or null).
  
  @param <E>
  the list's element type
  @param list
  the list to cast
  @param type
  the class of the list's element type.
  @return the dynamically-type checked list.
  @throws java.lang.ClassCastException