@SuppressWarnings("rawtypes") public static String unqualifiedClassName(Class type){
  if (type.isArray()) {
    return unqualifiedClassName(type.getComponentType()) + "Array";
  }
  String name=type.getName();
  return name.substring(name.lastIndexOf('.') + 1);
}

@ SuppressWarnings ( "rawtypes" ) public static String unqualifiedClassName ( Class type ) { if ( type . isArray ( ) ) { return unqualifiedClassName ( type . getComponentType ( ) ) + "Array" ; } String name = type . getName ( ) ; return name . substring ( name . lastIndexOf ( '.' ) + 1 ) ; }
returns the root name of the class .
