ntlcn / xmappr

Automatically exported from code.google.com/p/xmappr
0 stars 0 forks source link

Mapping to parent class #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Xmappr should support mappings where a field has a type of a parent class,
but concrete object assigned to this field are a children of fields's type:

@RootElement
public static class Root {

    @Elements({
            @Element(name = "first", targetType = FirstChild.class),
            @Element(name = "second", targetType = SecondChild.class)
     })
    public Parent parent;
}

Where FirstChild and SecondChild both extend Parent.

Child classes map to different XML elements (that can have different
structure).

TO-DO:
1. Enhance MappingBuilder to support this scenario.
2. Write test.

Original issue reported on code.google.com by peter.kn...@gmail.com on 22 Jan 2010 at 9:36

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r260.

Original comment by peter.kn...@gmail.com on 22 Jan 2010 at 9:38