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.

Test.java 484B

12345678910111213141516171819202122232425262728293031
  1. import java.util.List;
  2. public class Test {
  3. public boolean method(final MyInterface iface) {
  4. for(final String s:iface.listFile()) if(s.equals("blah")) {
  5. System.out.println("Test.method()");
  6. continue;
  7. }
  8. return false;
  9. }
  10. public void notCalledMethod() {
  11. }
  12. }
  13. interface MyInterface {
  14. public abstract List<String> listFile();
  15. }
  16. aspect MyAspect {
  17. pointcut p() : call(public * Test.notCalledMethod());
  18. before() : p() {
  19. System.out.println("calling method");
  20. }
  21. }