You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GenericAnnotation.java 437B

123456789101112131415
  1. import java.lang.annotation.Annotation;
  2. public abstract aspect GenericAnnotation<A extends Annotation> {
  3. pointcut annotatedCall(A a) : call(@A * *.*(..)) && @annotation(a);
  4. before(A a) : annotatedCall(a) {
  5. System.err.println("Reference pointcut advice. "+a.annotationType());
  6. }
  7. before(A a) : call(@A * *.*(..)) && @annotation(a) {
  8. System.err.println("Inlined pointcut advice. "+a.annotationType());
  9. }
  10. }