List of utility methods to do Class Name Format
String | classToResourceName(Class> clazz) Get the resource name for the class file for the given class return classNameToResourceName(clazz.getName());
|
String | classToSignatureIdentifier(Class clazz) class To Signature Identifier if (clazz == null) { return ""; } else if (clazz == boolean.class) { return (clazz.isArray() ? "[" : "") + "Z"; } else if (clazz == byte.class) { return (clazz.isArray() ? "[" : "") + "B"; } else if (clazz == char.class) { return (clazz.isArray() ? "[" : "") + "C"; ... |
String | classToSlashed(String className) class To Slashed if (className == null) return null; return className.replace('.', '/'); |
String | classToString(Class c) Turns a class into a string. String result; int dim; int i; if (c.isArray()) { dim = getArrayDimensions(c); result = getArrayClass(c).getName(); for (i = 0; i < dim; i++) result += ARRAY_INDICATOR; ... |
String | classToString(Class> clazz) class To String if (clazz.isArray()) return classToString(clazz.getComponentType()) + "[]"; if (clazz.isPrimitive()) return clazz.toString(); return clazz.getSimpleName(); |
String | classToString(Class[] array, String separator, String defaultValue) class To String if (null == array) { return defaultValue; } else { StringBuilder result = new StringBuilder(); for (int i = 0; i < array.length; i++) { if (result.length() > 0) { result.append(separator); result.append(array[i].getName()); return result.toString(); |
String | classToString(Class[] cArr) class To String String retVal = ""; if (cArr != null) { for (Class c : cArr) { retVal += "\t" + c.getName() + "\n"; return retVal; |
String | classToString(int clasS) class To String switch (clasS) { case 1: return "IN"; case 2: return "CS"; case 3: return "CH"; case 4: ... |
String | classToStringRepresentation(Class> c) class To String Representation if (void.class.equals(c)) { return "V"; } else if (byte.class.equals(c)) { return "B"; } else if (char.class.equals(c)) { return "C"; } else if (double.class.equals(c)) { return "D"; ... |
String | classToXMLName(Class class To XML Name return dasherize(klass.getSimpleName()).toLowerCase();
|