use of org.springframework.aop.support.annotation.AnnotationMatchingPointcut in project druid by alibaba.
the class StatAnnotationAdvisor method buildPointcut.
protected Pointcut buildPointcut() {
Pointcut cpc = new AnnotationMatchingPointcut(Stat.class, true);
Pointcut mpc = AnnotationMatchingPointcut.forMethodAnnotation(Stat.class);
ComposablePointcut result = new ComposablePointcut(cpc).union(mpc);
return result;
}
use of org.springframework.aop.support.annotation.AnnotationMatchingPointcut in project spring-framework by spring-projects.
the class MethodValidationPostProcessor method afterPropertiesSet.
@Override
public void afterPropertiesSet() {
Pointcut pointcut = new AnnotationMatchingPointcut(this.validatedAnnotationType, true);
this.advisor = new DefaultPointcutAdvisor(pointcut, createMethodValidationAdvice(this.validator));
}
use of org.springframework.aop.support.annotation.AnnotationMatchingPointcut in project spring-framework by spring-projects.
the class AsyncAnnotationAdvisor method buildPointcut.
/**
* Calculate a pointcut for the given async annotation types, if any.
* @param asyncAnnotationTypes the async annotation types to introspect
* @return the applicable Pointcut object, or {@code null} if none
*/
protected Pointcut buildPointcut(Set<Class<? extends Annotation>> asyncAnnotationTypes) {
ComposablePointcut result = null;
for (Class<? extends Annotation> asyncAnnotationType : asyncAnnotationTypes) {
Pointcut cpc = new AnnotationMatchingPointcut(asyncAnnotationType, true);
Pointcut mpc = AnnotationMatchingPointcut.forMethodAnnotation(asyncAnnotationType);
if (result == null) {
result = new ComposablePointcut(cpc);
} else {
result.union(cpc);
}
result = result.union(mpc);
}
return result;
}
Aggregations