toReadableStringByReflection

A useful utility function for debugging purposes. It produces the string produced by toString if the class were a data class with all public properties recursively. Note the data should not have cyclic references, otherwise the function call will not terminate. Note that if a class has an overriden toString method (for example a data class), it will be called directly, so if it contains a public property whose class doesn't have an overriden toString method the default Any.toString will be called.