import java.util.Map; interface RawEntity {} interface AoContributor extends RawEntity {} class Test { void foo(Map contributors) { AoContributor c = contributors.computeIfAbsent("", email -> create(AoContributor.class, of("clmn", email))); } static , K> T create(Class c, Map v2) { return null; } static Map of(K1 k1, V1 v1) { return null; } }