How would you map the StringContainer class bellow?
public class Container<T> {
private List<T> elements;
public List<T> getElements() {
return elements;
}
public void setElements(List<T> elements) {
this.elements = elements;
}
}
public class StringContainer extends Container<String> {
}
As-is, Selma mapper does not compiler (T cannot be resolved to a type):
public final selmatest1.b.StringContainer asStringContainer(selmatest1.a.StringContainer in) {
selmatest1.b.StringContainer out = null;
if (in != null) {
out = new selmatest1.b.StringContainer();
if (in.getElements() != null) {
java.util.ArrayList<T> aelementsTmpCollection = new java.util.ArrayList<T>(in.getElements().size());
out.setElements(aelementsTmpCollection);
for (T aelementsItem : in.getElements()) {
}
}
else {
out.setElements(null);
}
}
return out;
}
Manually mapping the whole StringContainer is not an option, as it contains a lot of fields. An acceptable workaround would be the ability to manually map the elements field, but I understand this currently is not possible.