public static String transformSignature ( String signature ) { StringBuilder buf = new StringBuilder ( ) ; int lastBracket = signature . lastIndexOf ( ' ' ) ; if ( lastBracket > 0 ) { buf . append ( signature . substring ( 0 , lastBracket + 1 ) ) ; signature = signature . substring ( lastBracket + 1 ) ; } if ( signature . startsWith ( "L" ) ) { signature = signature . substring ( 1 , signature . length ( ) - 1 ) . replace ( ' ' , ' ' ) ; signature = transformClassName ( signature ) ; signature = "L" + signature . replace ( ' ' , ' ' ) + ";" ; } buf . append ( signature ) ; return buf . toString ( ) ; }
Transform a field or method parameter signature to allow it to be compared even if it is moved to another package .