Code example for AbstractBeanFactoryBasedTargetSourceCreator

0
		assertEquals("Incorrect number of calls to proxy", 2, beforeAdvice.getCalls()); 
	} 
 
} 
 
class SelectivePrototypeTargetSourceCreator extends AbstractBeanFactoryBasedTargetSourceCreator { 
 
	@Override 
	protected AbstractBeanFactoryBasedTargetSource createBeanFactoryBasedTargetSource( 
			Class<?> beanClass, String beanName) { 
		if (!beanName.startsWith("prototype")) { 
			return null; 
		} 
		return new PrototypeTargetSource(); 
	} 
 
}