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.

Basic.aj 508B

1234567891011121314151617181920212223242526272829
  1. public class Basic {
  2. public static void main(String []argv) {
  3. Basic b = new Basic();
  4. b.tm();
  5. b.ntm();
  6. b.tm();
  7. }
  8. public void tm() {
  9. // trivial : <10 instructions
  10. }
  11. public void ntm() {
  12. // nontrivial
  13. StringBuffer sb = new StringBuffer();
  14. for (int j=0;j<100;j++) {
  15. sb.append("a").append("b").append("c");
  16. }
  17. }
  18. }
  19. aspect X {
  20. before(): execution(trivial * *m(..)) {
  21. System.err.println("Trivial method executing:"+thisJoinPoint.getSignature());
  22. }
  23. }