Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1234567891011121314151617181920212223
  1. package a;
  2. @TypeAnnotation
  3. public aspect AnnotatedAspect {
  4. @FieldAnnotation int foo = 5;
  5. @MethodAnnotation int getFoo() { return foo; }
  6. @ConstructorAnnotation
  7. public AnnotatedAspect() {}
  8. }
  9. aspect VerifyAnnotations {
  10. declare warning : set(@FieldAnnotation * *) : "annotated field";
  11. declare warning : execution(@MethodAnnotation * *(..)) : "annotated method";
  12. declare warning : execution(@ConstructorAnnotation new(..)) : "annotated constructor";
  13. declare warning : staticinitialization(@TypeAnnotation *) : "annotated type";
  14. }