Code example for AnnotationMatchingPointcut

0
	public PersistenceExceptionTranslationAdvisor( 
			PersistenceExceptionTranslator persistenceExceptionTranslator, 
			Class<? extends Annotation> repositoryAnnotationType) { 
 
		this.advice = new PersistenceExceptionTranslationInterceptor(persistenceExceptionTranslator); 
		this.pointcut = new AnnotationMatchingPointcut(repositoryAnnotationType, true); 
	} 
 
	/** 
	 * Create a new PersistenceExceptionTranslationAdvisor. 
	 * @param beanFactory the ListableBeanFactory to obtaining all 
	 * PersistenceExceptionTranslators from 
	 * @param repositoryAnnotationType the annotation type to check for 
	 */ 
	PersistenceExceptionTranslationAdvisor( 
			ListableBeanFactory beanFactory, Class<? extends Annotation> repositoryAnnotationType) { 
 
		this.advice = new PersistenceExceptionTranslationInterceptor(beanFactory); 
		this.pointcut = new AnnotationMatchingPointcut(repositoryAnnotationType, true); 
	}