We have a large number of classes that is generated by JAXB. There are a couple that have identical fields and I want to see if there is a clean way to map class A to class B.
Example:
public static class ParentA implements ... {
public static class A implements ... {
protected String name;
}
}
public static class ParentB implements ... {
public static class B implements ... {
protected String name;
}
}
I want to take an incoming A
and map it to B
but there are many other classes that I want to map A
to. How can I handle this? I see that there is a copyTo
method, but it only copies A
to another A
.