Move the rename logic of printed class names  into a static function.

Add a static function in typemap that manage the rename previously made
by Style::ClassName.