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.

DeclareAnnot.java 885B

123456789101112131415161718192021222324252627282930
  1. import java.lang.annotation.*;
  2. @Retention(RetentionPolicy.RUNTIME)
  3. @interface Annot {}
  4. aspect DeclareAnnot {
  5. // declare @method: * *.get*() || boolean *.is*(): @Annot;
  6. // declare @field: (String *.*) || (boolean *.*) : @Annot;
  7. // declare @field: (String *.*) && (boolean *.*) : @Annot;
  8. // declare @field: (String *.*) && !(boolean *.*) : @Annot;
  9. declare @field: ((String *.*) || !(String *.*)) && !(boolean *.*) : @Annot;
  10. declare @field: String *.* : @Annot;
  11. /*
  12. declare @constructor: Person.new() || Person.new(*) : @Annot;
  13. declare @method: * *.get*() && boolean *.is*(): @Annot;
  14. declare @field: String *.* && boolean *.* : @Annot;
  15. declare @constructor: Person.new() && Person.new(*) : @Annot;
  16. declare @method: !(* *.get*()): @Annot;
  17. declare @field: !(String *.*) : @Annot;
  18. declare @constructor: !(Person.new()) : @Annot;
  19. */
  20. }