JAXB type Erasure

323 Views Asked by At

I'm trying to create java to xsd for a java type that looks like this.

public class MainRequest<E extends AParentType<Person>> extends EObject {
private Transaction tran;
private E e;
private String email;
}

public class SubRequest extends MainRequest<AChildType> {
}

where AChildType extends AParentType.

when i try to create a schema for SubRequest. I expect it to substitute 'e' with AChildType, but it retains the AParentType.

Is there something wrong with this ? Is there anyway i can achieve this. Not sure if @XmlAdapter is a solution.

Appreciate help.

0

There are 0 best solutions below