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