blob: c62edd660bb1df5a4e48efa82fc5c33947f9cd8d (
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
//version 8:
import java.util.function.Function;
public class ValDelegateMethodReference {
public void config() {
final Column<Entity, java.lang.String> column = createColumn(Entity::getValue);
}
private <V> Column<Entity, V> createColumn(Function<Entity, V> func) {
return new Column<>(func);
}
}
class Column<T, V> {
public Column(Function<T, V> vp) {
}
}
class Entity {
private MyDelegate innerDelegate;
@java.lang.SuppressWarnings("all")
public java.lang.String getValue() {
return this.innerDelegate.getValue();
}
@java.lang.SuppressWarnings("all")
public java.lang.Boolean getABoolean() {
return this.innerDelegate.getABoolean();
}
@java.lang.SuppressWarnings("all")
public void setValue(final java.lang.String value) {
this.innerDelegate.setValue(value);
}
@java.lang.SuppressWarnings("all")
public void setABoolean(final java.lang.Boolean aBoolean) {
this.innerDelegate.setABoolean(aBoolean);
}
}
class MyDelegate {
private String value;
private Boolean aBoolean;
@java.lang.SuppressWarnings("all")
public String getValue() {
return this.value;
}
@java.lang.SuppressWarnings("all")
public Boolean getABoolean() {
return this.aBoolean;
}
@java.lang.SuppressWarnings("all")
public void setValue(final String value) {
this.value = value;
}
@java.lang.SuppressWarnings("all")
public void setABoolean(final Boolean aBoolean) {
this.aBoolean = aBoolean;
}
}
|