BOUML is a free UML 2 tool box (under development) allowing you to specify and generate code in C++, Java, Idl, Php and Python. BOUML runs under Unix/Linux/Solaris, MacOS X(Power PC and Intel) and Windows. BOUML is very fast and doesn't require much memory to manage several thousands of classes, see benchmark.
BOUML is extensible, and the external tools named plug-outs can be written in C++ or Java, using BOUML for their definition as any other program. The code generators and reverses are ones of the pre-defined plug-outs included in the BOUML distribution.