question: 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 ; }
target:  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',';','>',';']