aboutsummaryrefslogtreecommitdiff
path: root/test/transform/resource/before/ExtensionMethodGeneric.java
blob: d44c663be984eac3e16917b47ecde5660ef778ef (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
import java.util.List;
import java.util.Map;

import lombok.experimental.ExtensionMethod;

@ExtensionMethod(ExtensionMethodGeneric.Extensions.class)
class ExtensionMethodGeneric {
	public void test() {
		List<String> stringList = null;
		List<Number> numberList = null;
		stringList.test();
		stringList.test(numberList);
		stringList.test(stringList).test(numberList);
		Integer i = stringList.test2();
		
		Map<String, Integer> map = null;
		List<String> l = map.test(stringList, numberList);
	}
	
	static class Extensions {
		public static <T> List<T> test(List<String> obj, List<T> list) {
			return null;
		}
		public static <K,V> K test(Map<String, Integer> obj, K k, V v) {
			return k;
		}
		public static <T> T test(List<T> list) {
			return null;
		}
		public static <T,U> U test2(List<T> list) {
			return null;
		}
	}
}