private static Statistics getStatistics ( Class < ? > target , String signature ) { initIfNeeded ( ) ; Statistics statistics = MAPPING . get ( signature ) ; if ( statistics == null ) { synchronized ( JCRAPIAspect . class ) { Class < ? > interfaceClass = findInterface ( target ) ; if ( interfaceClass != null ) { Map < String , Statistics > allStatistics = ALL_STATISTICS . get ( interfaceClass . getSimpleName ( ) ) ; if ( allStatistics != null ) { int index1 = signature . indexOf ( ' ' ) ; int index = signature . substring ( 0 , index1 ) . lastIndexOf ( ' ' ) ; String name = signature . substring ( index + 1 ) ; statistics = allStatistics . get ( name ) ; } } if ( statistics == null ) { statistics = UNKNOWN ; } Map < String , Statistics > tempMapping = new HashMap < String , Statistics > ( MAPPING ) ; tempMapping . put ( signature , statistics ) ; MAPPING = Collections . unmodifiableMap ( tempMapping ) ; } } if ( statistics == UNKNOWN ) // NOSONAR { return null ; } return statistics ; }
Gives the corresponding statistics for the given target class and AspectJ signature