public static String getCacheName ( Method method , String methodCacheName , CacheDefaults cacheDefaultsAnnotation , boolean generate ) { assertNotNull ( method , "method parameter must not be null" ) ; assertNotNull ( methodCacheName , "methodCacheName parameter must not be null" ) ; String cacheName = methodCacheName . trim ( ) ; if ( cacheName . isEmpty ( ) && cacheDefaultsAnnotation != null ) { cacheName = cacheDefaultsAnnotation . cacheName ( ) . trim ( ) ; } if ( cacheName . isEmpty ( ) && generate ) { cacheName = getDefaultMethodCacheName ( method ) ; } return cacheName ; }
Resolves the cache name of a method annotated with a JCACHE annotation .