Implement Cloneable and override Object#clone() to create deep copies of the corner and edge treatments. The Cloneable method is generally discouraged, but this solution appears to be the most effective solution for our use case because:
- CornerTreatment and EdgeTreatment don't contain mutable fields, so using the native Object#clone() should be fine. This allows us to avoid intervening in the clone() method, which is one of the main reasons to avoid using Obect#clone().
- Since we have to maintain binary compatibility with our 1.0.0 stable release, we have very little wiggle room with which to ensure that we have effective copy() methods in each subclass of CornerTreatment and EdgeTreatment.
PiperOrigin-RevId: 222311453