您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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. }