@Nonnull
  public static String extractClassName(@Nonnull final String canonicalJavaClassName) {
    final int lastDot = canonicalJavaClassName.lastIndexOf('.');
    if (lastDot < 0) {
      return canonicalJavaClassName.trim();
    }
    return canonicalJavaClassName.substring(lastDot + 1).trim();
  }
@ Nonnull public static String extractClassName ( @ Nonnull final String canonicalJavaClassName ) { final int lastDot = canonicalJavaClassName . lastIndexOf ( '.' ) ; if ( lastDot < 0 ) { return canonicalJavaClassName . trim ( ) ; } return canonicalJavaClassName . substring ( lastDot + 1 ) . trim ( ) ; }
Extract class name from canonical Java class name

@param canonicalJavaClassName canonical class name (like 'a.b.c.SomeClassName'), must not be null
@return extracted class name, must not be null but can be empty for case "a.b.c.d."