File: Util.java

package info (click to toggle)
eclipse-jdt-ui 4.10-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 82,480 kB
  • sloc: java: 694,753; xml: 12,788; jsp: 33; makefile: 5
file content (76 lines) | stat: -rw-r--r-- 853 bytes parent folder | download | duplicates (4)
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
67
68
69
70
71
72
73
74
75
76
package p;

interface SAM1 {
	X apply(X x1);
}

interface SAM2 {
	X apply(X x1);
}

interface SAM3 {
	X apply(X x1);
}

interface SAM4 {
	X apply(X x1);
}

class A {
	X map(X x) {
		return null;
	}
}

class B extends A {
	@Override
	X map(X x) {
		return null;
	}
}

class Util {

	static SAM1 lambda1 = (x) -> {
		return null;
	};

	static SAM2 lambda2 = x -> null;

	static SAM3 lambda3 = (X x) -> {
		return null;
	};

	static SAM4 lambda4 = (X x) -> null;

	static A a;

	void f1(X x1) {
		x1.m1();
	}

	void f2(X x2) { // only method that is NOT changed.
		x2.m2();
	}

	void f_via_A(X x1) {
		a.map(x1).m2();
	}

	void f_via_lambda1(X x1) {
		lambda1.apply(x1).m2();
	}

	void f_via_lambda2(X x1) {
		lambda2.apply(x1).m2();
	}

	void f_via_lambda3(X x1) {
		lambda3.apply(x1).m2();
	}

	void f_via_lambda4(X x1) {
		lambda4.apply(x1).m2();
	}

}