Move getClassName logic to the Util class.