Hi is there a way to copy one class loaded context (atrributes etc) from one classloader (for instance a 'made' class Point) to another classloader?
Making clear, Example: I have an object Point on CL 1. Now running on another CL2, I want to creat this object in CL 3.
Some obj:
class Point {
int x;
int y;
public Point() {}
//getters and setters
Scenery:
...
class CL2 {
// Running on CL 2
...
// Point obj from CL 1
Object point = gotFromCL1();
// Want to create the object on Cl2
Object pointCL2 = point.conversion();
But I can't use sun.reflection (not available) and serialization doesn't work since CL2 automatically "reconstruct" the object with CL 1.
One solution that I tought was do an "100%" java reflection rconstruct, basically getting the fields of object from CL2 and setting up on the new obj.
PS: It needs to run on Java 1.4.2 :'(