class CacheInvocationContextFactory {

    public static CacheInvocationContext<CacheRemove> createCacheRemoveInvocationContext(MetaHolder metaHolder) {
        Method method = metaHolder.getMethod();
        if (method.isAnnotationPresent(CacheRemove.class)) {
            CacheRemove cacheRemove = method.getAnnotation(CacheRemove.class);
            MethodExecutionAction cacheKeyMethod = createCacheKeyAction(cacheRemove.cacheKeyMethod(), metaHolder);
            return new CacheInvocationContext<CacheRemove>(cacheRemove, cacheKeyMethod, metaHolder.getObj(), method, metaHolder.getArgs());
        }
        return null;
    }

}