Java Utililty Methods Class Name Get

List of utility methods to do Class Name Get

Description

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

Method

StringclassName(Object value)
Returns the type name of the given value
return name(value != null ? value.getClass() : null);
StringclassName(String classFile, String pre)
class Name
String objStr = classFile.replaceAll("\\\\", "/");
return objStr.replaceAll("/", ".");
StringclassName(String classFullName)
class Name
int positionLastPoint = classFullName.lastIndexOf(".") + 1;
return classFullName.substring(positionLastPoint);
StringclassName(String fullyQualifiedName)
class Name
int pos = fullyQualifiedName.lastIndexOf(".");
if (pos != -1) {
    return fullyQualifiedName.substring(pos + 1);
return fullyQualifiedName;
StringclassName(String nodeName)
class Name
return toJavaIdentifier(nodeName, true);
StringclassName(String path)
class Name
return path.replace('\\', '/').replace('/', '.').substring(0, path.length() - 6);
StringclassName(String underScore)
class Name
String name = fieldName(underScore);
return Character.toUpperCase(name.charAt(0)) + name.substring(1);
StringclassNames(String description)
class Names
int iSharp = description.indexOf('#');
if (iSharp == -1)
    return description;
return description.substring(0, iSharp);
StringclassNameSubName(String className)
class Name Sub Name
int index = className.lastIndexOf(".");
if (index != -1) {
    return className.substring(index + 1);
return className;
String[]classNameSubPackage(String className)
class Name Sub Package
int index = className.lastIndexOf(".");
if (index != -1) {
    String[] strArr = new String[2];
    strArr[0] = className.substring(0, index);
    strArr[1] = className.substring(index + 1);
    return strArr;
return new String[] { "", className };
...