List of utility methods to do Class Name Convert To
String | classNameToAsm(Class> c1ass) class Name To Asm return classNameToAsm(c1ass.getName());
|
String | classNameToConstant(String className) class Name To Constant return camelCaseNameToConstant(className);
|
String | classNameToDirectoryName(final Class> targetClass) class Name To Directory Name return targetClass.getName().replace('.', '/') + "/"; |
String | classnameToFilename(String classname) classname To Filename if (classname == null) throw new IllegalArgumentException("Class name is null"); if (!classname.startsWith("/")) { classname = "/" + classname; classname = classname.replace('.', '/'); classname = classname + ".class"; return classname; ... |
String | classNameToFilePath(String className) class Name To File Path String str; if (className.indexOf(".") < 0) { return className; } else { str = className.replaceAll("\\.", "/"); return str; |
String | classNameToFullyQualifiedClassName(String packageName, String className) class Name To Fully Qualified Class Name return (packageName.length() > 0 ? packageName + "." + className : className).replace(".", "/"); |
String | classNameToInternalClassName(String className) Will convert a class name to its name in the class definition format (e.g org.objenesis.EmptyClass becomes org/objenesis/EmptyClass ) return className.replace('.', '/'); |
String | classNameToJavaPath(String name) class Name To Java Path return (name.replace(FQN_SEPARATOR, PATH_SEPERATOR) + ".java"); |
String | classNameToJavaUri(String className) class Name To Java Uri return className.replace('.', '/').concat(DOT_JAVA); |
String | classNameToPackageName(String fqn) class Name To Package Name int lastSeparatorPos = fqn.lastIndexOf(FQN_SEPARATOR); if (lastSeparatorPos == -1) return null; else return fqn.substring(0, lastSeparatorPos); |