Yeah, I looked first on Ref if there's already a method for this and didn't find it so I implemented it myself.

So should I refactor Ref to be an abstract class? Or introduce an "AbstractRef"? (No, that would be ugly for the static method, i.e. AbstractRef.shortenRefName) Or a utility class called Refs a la Guava? Meh.