public static String collapse(String name){
  if (name == null) {
    return null;
  }
  int breakPoint=name.lastIndexOf('.');
  if (breakPoint < 0) {
    return name;
  }
  return collapseQualifier(name.substring(0,breakPoint),true) + name.substring(breakPoint);
}

public static String collapse ( String name ) { if ( name == null ) { return null ; } int breakPoint = name . lastIndexOf ( '.' ) ; if ( breakPoint < 0 ) { return name ; } return collapseQualifier ( name . substring ( 0 , breakPoint ) , true ) + name . substring ( breakPoint ) ; }
collapses a name . mainly intended for use with classnames , where an example might serve best to explain . imagine you have a class named ' org . hibernate . internal . util . stringhelper ' ; calling collapse on that classname will result in ' o . h . u . stringhelper ' .
