A Method for Generating Solutions of Einstein's Equations