private static < T > CachedStopwatchSource < T , Method > newCacheStopwatchSource ( final AbstractMethodStopwatchSource < T > stopwatchSource ) { return new CachedStopwatchSource < T , Method > ( stopwatchSource ) { @ Override protected Method getLocationKey ( T location ) { return stopwatchSource . getTargetMethod ( location ) ; } } ; }
Wraps given stopwatch source in a cache .