sS shortenClassNames(S s) { ret regexpReplace(s, "[\\w\\.\\$]+", matcher -> shortenClassName(matcher.group())); }