What are the possibilities of doing deep object cloning without Java reflection? I have used Object cloning libraries that use reflection but AppEngine does not allow to do that.
So my existing application that worked with Tomcat not does not work.
Update:
Dozer library seems to be the best bet:
Mapper mapper = new DozerBeanMapper();
DestinationObject destObject = mapper.map(sourceObject, DestinationObject.class);
Question would be if I don’t need custom mapping can I just do the above as it is?
For example:
Cat cat = new Cat();
Mapper mapper = new DozerBeanMapper();
Cat newCat = mapper.map(cat, Cat.class);
Update:
When I run my app with Dozer I get this error:
Caused by: java.lang.NoSuchMethodError: org.apache.commons.lang.StringUtils.contains(Ljava/lang/String;Ljava/lang/String;)Z
at org.dozer.util.ResourceLoader.getResource(ResourceLoader.java:53)
at org.dozer.util.DefaultClassLoader.loadResource(DefaultClassLoader.java:44)
at org.dozer.config.GlobalSettings.loadGlobalSettings(GlobalSettings.java:116)
at org.dozer.config.GlobalSettings.<init>(GlobalSettings.java:67)
at org.dozer.config.GlobalSettings.<clinit>(GlobalSettings.java:46)
Looks like I am missing something, although I added Dozer using Maven.
Have you considered using Dozer?
[from their website]