List of utility methods to do Class Name Create
String | toClassName(String resourceName) to Class Name return slashesToDots(resourceName.substring(0, resourceName.lastIndexOf("."))); |
String | toClassName(String str) translate a string to a valid classname string StringBuilder rtn = new StringBuilder(); String[] arr = str.split("[\\\\|//]"); for (int i = 0; i < arr.length; i++) { if (arr[i].length() == 0) continue; if (rtn.length() != 0) rtn.append('.'); char[] chars = arr[i].toCharArray(); ... |
String[] | toClassNames(Class>... classes) to Class Names int length = classes.length; String[] result = new String[length]; for (int i = 0; i < length; i++) { result[i] = classes[i].getName(); return result; |