public static String typeName(String clsName){
  int packageEnd=clsName.lastIndexOf('.');
  if (packageEnd >= 0 && packageEnd < clsName.length() - 1)   clsName=clsName.substring(packageEnd + 1);
  if (clsName.endsWith("[]")) {
    clsName=clsName.substring(0,clsName.length() - 2) + "_array";
  }
  int parentEnd=clsName.lastIndexOf('$');
  if (parentEnd >= 0)   clsName=clsName.substring(parentEnd + 1);
  return clsName;
}

public static String typeName ( String clsName ) { int packageEnd = clsName . lastIndexOf ( '.' ) ; if ( packageEnd >= 0 && packageEnd < clsName . length ( ) - 1 ) clsName = clsName . substring ( packageEnd + 1 ) ; if ( clsName . endsWith ( "[]" ) ) { clsName = clsName . substring ( 0 , clsName . length ( ) - 2 ) + "_array" ; } int parentEnd = clsName . lastIndexOf ( '$' ) ; if ( parentEnd >= 0 ) clsName = clsName . substring ( parentEnd + 1 ) ; return clsName ; }
gets type name by class .
