List of utility methods to do Class Name Get
String | extractPartialClassName(String className, int parts) Extract a partial name of a class name, starting from the end. String partialCategoryName = className; int nofDots = 0; int dotIndex = className.lastIndexOf('.'); if (dotIndex != -1) { nofDots++; while (nofDots < parts && dotIndex > -1) { dotIndex = className.lastIndexOf('.', dotIndex - 1); ... |
String | createValidClassName(String str) create Valid Class Name String valid = str.replace(" ", ""); valid = valid.replace(":", ""); valid = valid.replace("-", ""); valid = valid.replace(",", ""); return valid; |
String | getClassName() get Class Name return new Exception().getStackTrace()[0].getClassName(); |