Java Utililty Methods Class Name Create

List of utility methods to do Class Name Create

Description

The list of methods to do Class Name Create are organized into topic(s).

Method

StringtoClassName(String resourceName)
to Class Name
return slashesToDots(resourceName.substring(0, resourceName.lastIndexOf(".")));
StringtoClassName(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;