public static String simpleClassName(Class<?> clazz) {
        Package pkg = clazz.getPackage();
        if (pkg != null) {
            return clazz.getName().substring(pkg.getName().length() + 1);
        } else {
            return clazz.getName();
        }
    }
public static String simpleClassName(Class<?> clazz) {
        Package pkg = clazz.getPackage();
        if (pkg != null) {
            return clazz.getName().substring(pkg.getName().length() + 1);
        } else {
            return clazz.getName();
        }
    }
public static String simpleClassName ( Class < ? > clazz ) { Package pkg = clazz . getPackage ( ) ; if ( pkg != null ) { return clazz . getName ( ) . substring ( pkg . getName ( ) . length ( ) + 1 ) ; } else { return clazz . getName ( ) ; } }
Generates a simplified name from a {@link Class}.  Similar to {@link Class#getSimpleName()}, but it works fine
with anonymous classes.
Generates a simplified name from a {