AspectJ Cookbook

From Zanecorpwiki

Jump to: navigation, search

Select Method Join Points on Annotations

pointcut annotatedMethods() :
  execution(@Annotation * *(..));

To pass the annotation to the advice (e.g., to access annotation parameters):

pointcut annotatedMethods(Annotation annotation) :
  execution(@Annotation * *(..)) && @annotation(annotation);
Personal tools