move method getClass to ClassUtil
handle Array with the right way, add test coverage