Spring Framework AnnotationCacheOperationSource - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework AnnotationCacheOperationSource class.

This code example shows how to use the following methods:
public class ExpressionEvaluatorTests { 
	private ExpressionEvaluator eval = new ExpressionEvaluator(); 
	private AnnotationCacheOperationSource source = new AnnotationCacheOperationSource(); 
	private Collection<CacheOperation> getOps(String name) { 
		Method method = ReflectionUtils.findMethod(AnnotatedClass.class, name, Object.class, Object.class); 
		return source.getCacheOperations(method, AnnotatedClass.class); 
	public void testMultipleCachingSource() throws Exception { 
		Collection<CacheOperation> ops = getOps("multipleCaching"); 
		assertEquals(2, ops.size()); 
		Iterator<CacheOperation> it = ops.iterator(); 
		CacheOperation next = it.next(); 
		assertTrue(next instanceof CacheableOperation);