akshayyn / cloning

Automatically exported from code.google.com/p/cloning
Other
0 stars 0 forks source link

Ignore fields when clonning objects #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi, I would like to ignore some fields of the objects beeing cloned. This 
feature is simlar to the nullTransient but I cannot make the fields transient. 

A solution is annotating the fileds with something like @CloningIgnore. 

I am trying to extend the Cloner class to support that feature but some of the 
methods are private. I think extending or updating 'private List<Field> 
allFields(final Class<?> c)' will do the trick. 

Thanks
Fernando

Original issue reported on code.google.com by fboucq...@gmail.com on 13 Aug 2012 at 11:43

GoogleCodeExporter commented 8 years ago
ok, made allFields() protected so that it can be overridden. 

Original comment by kostas.k...@googlemail.com on 19 Aug 2012 at 9:59

GoogleCodeExporter commented 8 years ago
Great, thank you for the library!

Original comment by fboucq...@gmail.com on 19 Aug 2012 at 10:12

GoogleCodeExporter commented 8 years ago
cheers, this is available from the source repo at the moment as it is not yet 
deployed.

Original comment by kostas.k...@googlemail.com on 19 Aug 2012 at 10:20