Code example for AbstractPointcutAdvisor

0
	private final Set<Class<? extends Annotation>> publisherAnnotationTypes; 
 
	private final MessagePublishingInterceptor interceptor; 
 
	@SuppressWarnings("unchecked") //For JDK7 
	public PublisherAnnotationAdvisor(Class<? extends Annotation> ... publisherAnnotationTypes) { 
		this.publisherAnnotationTypes = new HashSet<Class<? extends Annotation>>(Arrays.asList(publisherAnnotationTypes)); 
		PublisherMetadataSource metadataSource = new MethodAnnotationPublisherMetadataSource(this.publisherAnnotationTypes); 
		this.interceptor = new MessagePublishingInterceptor(metadataSource); 
	} 
 
	@SuppressWarnings("unchecked") 
	public PublisherAnnotationAdvisor() { 
		this(Publisher.class); 
	} 
 
 
	/** 
	 * @deprecated Use {@link #setDefaultChannelName(String)}. 
	 * @param defaultChannel the default channel.