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.

Sixteen.java 523B

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