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.

ConcreteTest.aj 773B

12345678910111213141516171819202122232425
  1. package main.p1;
  2. import main.p2.AbstractTest;
  3. import main.Driver;
  4. final aspect ConcreteTest extends AbstractTest {
  5. protected pointcut pc(): execution(* Driver.doStuff());
  6. protected pointcut pc2(): execution(* Driver.doOtherStuff());
  7. Object around(): pc2() {
  8. //System.out.println("adding to the other stuff");
  9. /*If we comment out the next line we don't get a verify error.*/
  10. ConcreteTest ct = this;
  11. System.out.println("test: " + s + ", " + this.s + ", " + ct.s);
  12. System.out.println("The value of the field when replacing is " + getField());
  13. return proceed();
  14. }
  15. protected void hook() {
  16. /*This doesn't cause a verify error because this code is not inlined*/
  17. System.out.println("The value of the field is " + getField());
  18. }
  19. }