ReflectionUtils
object ReflectionUtils
Functions
Link copied to clipboard
Safely gets the class with this name wrapped in a Validated. The throwable will be of type ClassNotFoundException or ClassCastException if T is not assignable from the class.
Link copied to clipboard
inline suspend fun <T : Any> clone(obj: T, replaceProperties: Map<KProperty1<T, *>, Any> = emptyMap()): T
Reads the properties of an instance through reflection, and constructs a new instance of the same type. If this class contains immutable properties that cannot be changed through reflection these cannot be cloned and will be ignored.