public final static char[][] splitTypeLevelsSignature(String typeSignature){
  char[] source=Signature.removeCapture(typeSignature.toCharArray());
  CharOperation.replace(source,'$','.');
  char[][] signatures=new char[10][];
  int signaturesCount=0;
  int paramOpening=0;
  for (int idx=0, ln=source.length; idx < ln; idx++) {
switch (source[idx]) {
case '>':
      paramOpening--;
    if (paramOpening == 0) {
      if (signaturesCount == signatures.length) {
        System.arraycopy(signatures,0,signatures=new char[signaturesCount + 10][],0,signaturesCount);
      }
    }
  break;
case '<':
paramOpening++;
break;
case '.':
if (paramOpening == 0) {
if (signaturesCount == signatures.length) {
System.arraycopy(signatures,0,signatures=new char[signaturesCount + 10][],0,signaturesCount);
}
signatures[signaturesCount]=new char[idx + 1];
System.arraycopy(source,0,signatures[signaturesCount],0,idx);
signatures[signaturesCount][idx]=Signature.C_SEMICOLON;
signaturesCount++;
}
break;
case '/':
source[idx]='.';
break;
}
}
char[][] typeSignatures=new char[signaturesCount + 1][];
typeSignatures[0]=source;
for (int i=1, j=signaturesCount - 1; i <= signaturesCount; i++, j--) {
typeSignatures[i]=signatures[j];
}
return typeSignatures;
}

public final static char [ ] [ ] splitTypeLevelsSignature ( String typeSignature ) { char [ ] source = Signature . removeCapture ( typeSignature . toCharArray ( ) ) ; CharOperation . replace ( source , '$' , '.' ) ; char [ ] [ ] signatures = new char [ 10 ] [ ] ; int signaturesCount = 0 ; int paramOpening = 0 ; for ( int idx = 0 , ln = source . length ; idx < ln ; idx ++ ) { switch ( source [ idx ] ) { case '>' : paramOpening -- ; if ( paramOpening == 0 ) { if ( signaturesCount == signatures . length ) { System . arraycopy ( signatures , 0 , signatures = new char [ signaturesCount + 10 ] [ ] , 0 , signaturesCount ) ; } } break ; case '<' : paramOpening ++ ; break ; case '.' : if ( paramOpening == 0 ) { if ( signaturesCount == signatures . length ) { System . arraycopy ( signatures , 0 , signatures = new char [ signaturesCount + 10 ] [ ] , 0 , signaturesCount ) ; } signatures [ signaturesCount ] = new char [ idx + 1 ] ; System . arraycopy ( source , 0 , signatures [ signaturesCount ] , 0 , idx ) ; signatures [ signaturesCount ] [ idx ] = Signature . C_SEMICOLON ; signaturesCount ++ ; } break ; case '/' : source [ idx ] = '.' ; break ; } } char [ ] [ ] typeSignatures = new char [ signaturesCount + 1 ] [ ] ; typeSignatures [ 0 ] = source ; for ( int i = 1 , j = signaturesCount - 1 ; i <= signaturesCount ; i ++ , j -- ) { typeSignatures [ i ] = signatures [ j ] ; } return typeSignatures ; }
split signatures of all levels from a type unique key . < p / > example : for following type x < y < z > , v < w > , u > . a < b > , unique key is : " lx < ly < lz ; > ; lv < lw ; > ; lu ; > . la < lb ; > ; " < p / > the return splitted signatures array is : [ [ ' l ' , ' x ' , ' < ' , ' l ' , ' y ' , ' < ' , ' l ' , ' z ' , ' ; ' > ' , ' ; ' , ' l ' , ' v ' , ' < ' , ' l ' , ' w ' , ' ; ' > ' , ' ; ' , ' l ' , ' u ' , ' > ' , ' ; ' ] , [ ' l ' , ' a ' , ' < ' , ' l ' , ' b ' , ' ; ' , ' > ' , ' ; ' ]
