blob: ab9c416a5cb11bf2a3f50471141b126afa1f099c (
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
38
39
40
41
42
43
44
45
46
47
48
|
package com.vaadin.tests;
import com.vaadin.data.util.MethodProperty;
public class TestMethodProperty {
/**
* @param args
*/
public static void main(String[] args) {
MyTest myTest = new MyTest();
MethodProperty<Integer> methodProperty2 = new MethodProperty<Integer>(
Integer.TYPE, myTest, "getInt", "setInt", new Object[0],
new Object[] { null }, 0);
methodProperty2.setValue(3);
System.out.println("Succeeded");
}
public static class MyTest {
int integer;
public void setInteger(Integer integer) {
System.out.println("setInteger");
this.integer = integer;
}
public Integer getInteger() {
System.out.println("getInteger");
return Integer.valueOf(integer);
}
public void setInt(int i) {
System.out.println("setInt");
integer = i;
}
public int getInt() {
System.out.println("getInt");
return integer;
}
}
}
|