code: public static void validateListRefType(List<Ref> list, Ref.RefType type, String variableName) {
      // TODO (ns1344): Write a unit test for this method.
      checkNullListArgument(list, variableName);
      for (Ref ref : list) {
        validateArgumentRefType(ref, type, variableName);
      }
    }
docs: Checks a <code>List</code> argument to make sure that all the <code>Ref</code> in the list
  are of same <code>refType</code> type. If there is a mismatch
  <code>IllegalArgumentException</code> is thrown.
  
  @param list
  The <code>List</code> to check.
  @param type
  The <code>refType</code> check against.
  @param variableName
  The name of the variable being checked; for use in exception messages.