@SuppressWarnings("unchecked") private CacheOperationInvocationContext<?> createCacheOperationInvocationContext( Object target, Object[] args, JCacheOperation<?> operation) { return new DefaultCacheInvocationContext<>( (JCacheOperation<Annotation>) operation, target, args); }
@SuppressWarnings("unchecked") private CacheOperationInvocationContext<?> createCacheOperationInvocationContext( Object target, Object[] args, JCacheOperation<?> operation) { return new DefaultCacheInvocationContext<>( (JCacheOperation<Annotation>) operation, target, args); }
protected DefaultCacheInvocationContext<?> createDummyContext() throws Exception { Method method = Sample.class.getMethod("get", String.class); CacheResult cacheAnnotation = method.getAnnotation(CacheResult.class); CacheMethodDetails<CacheResult> methodDetails = new DefaultCacheMethodDetails<>(method, cacheAnnotation, "test"); CacheResultOperation operation = new CacheResultOperation(methodDetails, defaultCacheResolver, defaultKeyGenerator, defaultExceptionCacheResolver); return new DefaultCacheInvocationContext<>(operation, new Sample(), new Object[] {"id"}); }
@SuppressWarnings("unchecked") private CacheOperationInvocationContext<?> createCacheOperationInvocationContext( Object target, Object[] args, JCacheOperation<?> operation) { return new DefaultCacheInvocationContext<Annotation>( (JCacheOperation<Annotation>) operation, target, args); }