Support Cloning strategy based on object field and not just object class
Closed this issue · 3 comments
eladh commented
Hi @kostaskougios :-)
we got more a scenario were cloning strategy will be decided based on the the field context and not just the class itself
looking at the code : cloneObject got the field context can you also add the field data to the cloneInternal and exposed it as part of the Cloning strategy infrastructure
like this:
cloner.registerCloningStrategy((field ,toBeCloned ) -> {
return ICloningStrategy.Strategy.IGNORE;
});
best,
elad
kostaskougios commented
Hi, I've uploaded a snapshot at
https://oss.sonatype.org/content/repositories/snapshots/uk/com/robust-it/cloning/1.9.8-SNAPSHOT/
Please let me know if it is OK.
kostaskougios commented
Btw notice the IGNORE strategy will ignore the strategy and return a deep clone as if the strategy wasn't present.
eladh commented
10x :-)