blob: b2e18d5b3786fe9b62d28ca355572f814fd9e101 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
import java.beans.*;
public class DescriptorTest {
public static void main(String[] args) {
try {
new PropertyDescriptor("class",java.lang.Object.class);
System.out.println("PASSED: Property Object.class");
} catch(IntrospectionException e) {
System.out.println("FAILED: Property Object.class");
e.printStackTrace();
}
try {
new IndexedPropertyDescriptor("test",TestClass.class);
System.out.println("PASSED: Indexed Property Component.location");
} catch(IntrospectionException e) {
System.out.println("FAILED: Indexed Property Component.location");
e.printStackTrace();
}
try {
new EventSetDescriptor(java.awt.Button.class,"action",java.awt.event.ActionListener.class,"actionPerformed");
System.out.println("PASSED: Event Set Button.action");
} catch(IntrospectionException e) {
System.out.println("FAILED: Event Set Button.action");
e.printStackTrace();
}
try {
new MethodDescriptor(java.awt.Component.class.getMethod("getLocation",new Class[0]));
System.out.println("PASSED: Method Component.getLocation");
} catch(NoSuchMethodException e) {
System.out.println("FAILED: No such method: Component.getLocation()");
e.printStackTrace();
}
}
}
|