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.

Ten.java 491B

12345678910111213141516171819202122
  1. import java.io.File;
  2. import java.io.FileInputStream;
  3. import java.io.IOException;
  4. // matching unlock on transformed static method (J5)
  5. public aspect Ten {
  6. public static void main(String[] args) {
  7. C.b();
  8. }
  9. before(): !within(Ten) && unlock() {
  10. System.err.println("Unlocking occurring at "+thisJoinPoint);
  11. System.err.println(thisJoinPoint.getSourceLocation().getFileName());
  12. }
  13. }
  14. class C {
  15. public static synchronized void b() {
  16. System.err.println("hello");
  17. }
  18. }