public static String stripGenerics(String className){
  String name=className;
  if (name.contains("<")) {
    name=name.substring(0,name.indexOf("<"));
  }
  if (name.contains("[")) {
    name=name.substring(0,name.indexOf("["));
  }
  return name;
}

public static String stripGenerics ( String className ) { String name = className ; if ( name . contains ( "<" ) ) { name = name . substring ( 0 , name . indexOf ( "<" ) ) ; } if ( name . contains ( "[" ) ) { name = name . substring ( 0 , name . indexOf ( "[" ) ) ; } return name ; }
removes the generics and array parts of a class name .
