List of usage examples for org.springframework.aop TargetSource getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:org.springmodules.cache.interceptor.proxy.CacheProxyFactoryBeanTests.java
/** * Verifies that the method//from w w w .ja v a2 s . c o m * <code>{@link CacheProxyFactoryBean#getObjectType()}</code> returns the * class of the target if: * <ul> * <li>The proxy is <code>null</code>.</li> * <li>The target is not <code>null</code> and it is an instance of * <code>org.springframework.aop.TargetSource</code>.</li> * </ul> */ public void testGetObjectTypeWhenProxyIsNullAndTargetIsNotNullAndTargetIsInstanceOfTargetSource() { TargetSource instanceOfTargetSource = EmptyTargetSource.INSTANCE; factoryBean.setTarget(instanceOfTargetSource); // verify that the proxy is null before running the method to test. assertNull(factoryBean.getProxy()); assertEquals(instanceOfTargetSource.getClass(), factoryBean.getObjectType()); }