T (@NotNull Language language) { for (Language l = language; l != null; l = l.getBaseLanguage()) { List<T> extensions = forKey(l); if (!extensions.isEmpty()) { return extensions.get(0); } } return myDefaultImplementation; }