Direct reactions and Hauser-Feshbach theory