delight.strings.ClassNameUtils Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of delight-strings Show documentation
Show all versions of delight-strings Show documentation
Utilities for working with strings.
package delight.strings;
public final class ClassNameUtils {
/**
* Returns the name of a class without the package.
*
For instance delight.strings.StringUtils
will become StringUtils
* @return
*/
public static String getClassNameWithoutPackage(Class> clazz) {
String name = clazz.getName();
return name.substring(name.lastIndexOf(".")+1);
}
}