JID.bareJID as JID?

I am wondering how come the UnescapedJID/EscapedJID method bareJID returns a String instead of a JID.

Should not this return a corresponding JID based on the type of the class instead of String as the name of the method suggests?