public static String classNameOnly(String typeName){
  String dotted=descriptorToDot(typeName);
  int start=dotted.lastIndexOf(".");
  if (start < 0) {
    return dotted;
  }
 else {
    return dotted.substring(start + 1);
  }
}

public static String classNameOnly ( String typeName ) { String dotted = descriptorToDot ( typeName ) ; int start = dotted . lastIndexOf ( "." ) ; if ( start < 0 ) { return dotted ; } else { return dotted . substring ( start + 1 ) ; } }
extracts the class name from a type descriptor .
