Allow cloning of records if at least one of the record components is not clearly an immutable type.
Examples:
record RecordWithPrimitives(int a, int b) {}
record RecordWithList(List list) {}
For records of type RecordWithPrimitives, no cloning is required since it only contains clearly immutable components.
However, when creating an immutable proxy for an instance of RecordWithList,
we need to clone the record and wrap the list component into an immutable proxy itself.
Returns the enum constant of this class with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this class. (Extraneous whitespace characters are
not permitted.)
Parameters:
name - the name of the enum constant to be returned.