@ Override public String getSignature ( ) { String signature = super . getSignature ( ) ; if ( signature . indexOf ( ' ' ) == - 1 ) { return signature ; } if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( "Condensing signature [{}]" , signature ) ; } int returnTypeSpace = signature . indexOf ( " " ) ; StringBuilder sb = new StringBuilder ( 100 ) ; sb . append ( signature . substring ( 0 , returnTypeSpace + 1 ) ) ; // Have to replace ".." to "." for classes generated by guice. e.g. // Object com.cerner.beadledom.health.resource.AvailabilityResource..FastClassByGuice..77b09000.newInstance(int, Object[]) String [ ] parts = signature . replaceAll ( "\\.\\." , "." ) . substring ( returnTypeSpace + 1 ) . split ( "\\." ) ; for ( int i = 0 ; i < parts . length - 2 ; i ++ ) { // Shorten each package name to only include the first character sb . append ( parts [ i ] . charAt ( 0 ) ) . append ( "." ) ; } sb . append ( parts [ parts . length - 2 ] ) . append ( "." ) . append ( parts [ parts . length - 1 ] ) ; return sb . toString ( ) ; }
Returns the signature with the packages names shortened to only include the first character .