Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

123456789101112131415161718192021222324252627282930313233343536373839
  1. import java.awt.*;
  2. import java.awt.event.*;
  3. import javax.swing.*;
  4. public class NullWithFormals {
  5. public void realMain(String[] args) {
  6. new InnerWindowAdapter().windowClosing(null);
  7. }
  8. static class InnerWindowAdapter extends WindowAdapter {
  9. public void windowClosing(WindowEvent we) {
  10. }
  11. }
  12. public static void main(String[] args) {
  13. new NullWithFormals().realMain(args);
  14. }
  15. }
  16. aspect AspectW {
  17. pointcut pc0(WindowEvent we, String str) : instanceof(WindowAdapter) && executions(void windowClosing(we));
  18. static before(WindowEvent we, String str): pc0(we, str) {
  19. System.out.println(thisJoinPoint);
  20. }
  21. pointcut pc1(String str, WindowEvent we) : instanceof(WindowAdapter) && executions(void windowClosing(we));
  22. static before(String str, WindowEvent we): pc1(str, we) {
  23. System.out.println(thisJoinPoint);
  24. }
  25. pointcut pc2(WindowEvent we) : instanceof(WindowAdapter) && executions(void windowClosing(we));
  26. static before(WindowEvent we): pc2(we) {
  27. System.out.println(thisJoinPoint);
  28. }
  29. }