| 93 | } |
| 94 | |
| 95 | std::string TD_TL_writer_java::gen_class_name(std::string name) const { |
| 96 | if (name == "Object") { |
| 97 | assert(false); |
| 98 | } |
| 99 | if (name == "#") { |
| 100 | return "int"; |
| 101 | } |
| 102 | bool next_to_upper = true; |
| 103 | std::string result; |
| 104 | for (std::size_t i = 0; i < name.size(); i++) { |
| 105 | if (!is_alnum(name[i])) { |
| 106 | next_to_upper = true; |
| 107 | continue; |
| 108 | } |
| 109 | if (next_to_upper) { |
| 110 | result += to_upper(name[i]); |
| 111 | next_to_upper = false; |
| 112 | } else { |
| 113 | result += name[i]; |
| 114 | } |
| 115 | } |
| 116 | return result; |
| 117 | } |
| 118 | |
| 119 | std::string TD_TL_writer_java::gen_field_name(std::string name) const { |
| 120 | assert(name.size() > 0); |
nothing calls this directly
no outgoing calls
no test coverage detected