Suppose, we've got a very simple object:
import java.lang.reflect.*
class Test{
Oject o;
Method m;
Field f;
...
Test testObj = new Test();
}
I need to make a deep copy of testObj. Unfortunately, Object, Method and Field classes are not serializable. But is there a standard way, a workaround or any other way to make the copy have them?
I would greatly appreciate a code sample since general guiding (as in this topic) is too confusing for a newbie like me.