String renameType(Type type){
  if (type == null) {
    return null;
  }
  if (type.getSort() == Type.OBJECT) {
    String in=type.getInternalName();
    return "L" + renameInternalType(in) + ";";
  }
 else   if (type.getSort() == Type.ARRAY) {
    StringBuilder sb=new StringBuilder();
    for (int n=type.getDimensions(); n > 0; n--) {
      sb.append('[');
    }
    sb.append(renameType(type.getElementType()));
    return sb.toString();
  }
  return type.getDescriptor();
}

String renameType ( Type type ) { if ( type == null ) { return null ; } if ( type . getSort ( ) == Type . OBJECT ) { String in = type . getInternalName ( ) ; return "L" + renameInternalType ( in ) + ";" ; } else if ( type . getSort ( ) == Type . ARRAY ) { StringBuilder sb = new StringBuilder ( ) ; for ( int n = type . getDimensions ( ) ; n > 0 ; n -- ) { sb . append ( '[' ) ; } sb . append ( renameType ( type . getElementType ( ) ) ) ; return sb . toString ( ) ; } return type . getDescriptor ( ) ; }
renames an object type , e . g . " lcom . package . myclass ; " or an array type that has an object element , e . g . " [ lcom . package . myclass ; " if the type doesn ' t need to be renamed , returns the internal name of the input type .
