More or less, all UML modeling tools provide code generation based on your UML model.
Your question is not easy to answer, since I don't know are you looking for a free tool, what's your experience with UML modeling, and what do you expect to get. It's almost as you asked - which
IDE to use.
Anyway, I use PowerDesigner myself, and it's excellent. It provides the code generation based on UML model (e.g. class diagram) for a variaty of languages, not just Java. I also checked Enterprise Architect once or twice, so I think it also provides the functionality you need. Perhaps some of the Ranchers will have other tools in mind.