Get a class name into a configuration/filename key For example, PhantomController.class is converted to phantom-controller @param clazz the class @return the string representation
(String clazz)
| 944 | * @return the string representation |
| 945 | */ |
| 946 | public static String cname(String clazz) { |
| 947 | String codeName = ""; |
| 948 | |
| 949 | for (Character i : clazz.toCharArray()) { |
| 950 | if (Character.isUpperCase(i)) { |
| 951 | codeName = codeName + "-" + Character.toLowerCase(i); |
| 952 | } else { |
| 953 | codeName = codeName + i; |
| 954 | } |
| 955 | } |
| 956 | |
| 957 | if (codeName.startsWith("-")) { |
| 958 | codeName = codeName.substring(1); |
| 959 | } |
| 960 | |
| 961 | return codeName; |
| 962 | } |
| 963 | |
| 964 | /** |
| 965 | * Get a formatted representation of the memory given in megabytes |
nothing calls this directly
no test coverage detected