|
6 | 6 | import java.beans.PropertyChangeListener; |
7 | 7 | import java.util.Hashtable; |
8 | 8 |
|
9 | | -class Test_Class2 extends Test_ implements Test_Class_int { |
| 9 | +abstract class Test_Class2<T extends Number> extends Test_ implements Test_Class_int { |
10 | 10 |
|
11 | 11 |
|
12 | 12 | static { |
@@ -42,66 +42,71 @@ protected String getTesting() { |
42 | 42 |
|
43 | 43 | public Test_Class2() { |
44 | 44 |
|
45 | | - PropertyChangeListener l = new PropertyChangeListener() { |
46 | | - @Override |
47 | | - public void propertyChange(PropertyChangeEvent event) { |
48 | | - // Let the defaultCloseOperation handle the closing |
49 | | - // if the user closed the window without selecting a button |
50 | | - // (newValue = null in that case). Otherwise, close the dialog. |
51 | | - Test_Class2 x = Test_Class2.this; |
52 | | - System.out.println(x); |
53 | | - } |
54 | | - }; |
| 45 | +// PropertyChangeListener l = new PropertyChangeListener() { |
| 46 | +// @Override |
| 47 | +// public void propertyChange(PropertyChangeEvent event) { |
| 48 | +// // Let the defaultCloseOperation handle the closing |
| 49 | +// // if the user closed the window without selecting a button |
| 50 | +// // (newValue = null in that case). Otherwise, close the dialog. |
| 51 | +// Test_Class2 x = Test_Class2.this; |
| 52 | +// System.out.println(x); |
| 53 | +// } |
| 54 | +// }; |
55 | 55 |
|
56 | 56 | System.out.println("TestClass2() constructor "); |
57 | 57 |
|
58 | | - final Test_Class2 me = Test_Class2.this; |
59 | | - MouseListener c = new MouseListener() { |
60 | | - |
61 | | - @Override |
62 | | - public void mouseClicked(MouseEvent e) { |
63 | | - System.out.println("!!!"); |
64 | | - Test_Class2.this.showt(); |
65 | | - showt(); |
66 | | - assert (Test_Class2.this == me); |
67 | | - System.out.println("!!!"); |
68 | | - } |
69 | | - |
70 | | - @Override |
71 | | - public void mousePressed(MouseEvent e) { |
72 | | - // TODO Auto-generated method stub |
73 | | - |
74 | | - } |
75 | | - |
76 | | - @Override |
77 | | - public void mouseReleased(MouseEvent e) { |
78 | | - // TODO Auto-generated method stub |
79 | | - |
80 | | - } |
81 | | - |
82 | | - @Override |
83 | | - public void mouseEntered(MouseEvent e) { |
84 | | - // TODO Auto-generated method stub |
85 | | - |
86 | | - } |
87 | | - |
88 | | - @Override |
89 | | - public void mouseExited(MouseEvent e) { |
90 | | - // TODO Auto-generated method stub |
91 | | - |
92 | | - } |
93 | | - |
94 | | - }; |
| 58 | +// final Test_Class2 me = Test_Class2.this; |
| 59 | +// MouseListener c = new MouseListener() { |
| 60 | +// |
| 61 | +// @Override |
| 62 | +// public void mouseClicked(MouseEvent e) { |
| 63 | +// System.out.println("!!!"); |
| 64 | +// Test_Class2.this.showt(); |
| 65 | +// showt(); |
| 66 | +// assert (Test_Class2.this == me); |
| 67 | +// System.out.println("!!!"); |
| 68 | +// } |
| 69 | +// |
| 70 | +// @Override |
| 71 | +// public void mousePressed(MouseEvent e) { |
| 72 | +// // TODO Auto-generated method stub |
| 73 | +// |
| 74 | +// } |
| 75 | +// |
| 76 | +// @Override |
| 77 | +// public void mouseReleased(MouseEvent e) { |
| 78 | +// // TODO Auto-generated method stub |
| 79 | +// |
| 80 | +// } |
| 81 | +// |
| 82 | +// @Override |
| 83 | +// public void mouseEntered(MouseEvent e) { |
| 84 | +// // TODO Auto-generated method stub |
| 85 | +// |
| 86 | +// } |
| 87 | +// |
| 88 | +// @Override |
| 89 | +// public void mouseExited(MouseEvent e) { |
| 90 | +// // TODO Auto-generated method stub |
| 91 | +// |
| 92 | +// } |
| 93 | +// |
| 94 | +// }; |
95 | 95 | } |
96 | 96 |
|
97 | 97 | public Test_Class2(byte[]... d) { |
98 | 98 | System.out.println("Test_Class2 len = " + d.length); |
| 99 | + testAbstract(3, null, 40); |
99 | 100 | } |
100 | 101 |
|
101 | | - public static void main(String[] args) { |
102 | | - new Test_Class2(); |
103 | | - new Test_Class2(); |
104 | | - |
105 | | - } |
| 102 | +// public static void main(String[] args) { |
| 103 | +// //new Test_Class2(); |
| 104 | +// //new Test_Class2(); |
| 105 | +// |
| 106 | +// } |
| 107 | + |
| 108 | + public abstract void testAbstract(int i, T n, long j); |
| 109 | + |
| 110 | +// public abstract void testAbstract(int i, Integer n, long j); |
106 | 111 |
|
107 | 112 | } |
0 commit comments