title: Jackson Faster XML: how to parse abstract class' children? Mixins?
body: <p>We use generated object types from a schema via <code>xcj</code>. <em>Hence, not very flexible control over the types' definitions</em>. We also use JAXB annotations.</p>
  
  <p>Then, we use Jackson Faster XML for deserialization of those objects. Unfortunately, when we deserialize abstract classes, we get an exception:</p>
  
  <pre><code>com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of 
  com.x.y.z.AnstractType: abstract types either need to be mapped to concrete types, 
  have custom deserializer, or contain additional type information at 
  [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@2989b3db; 
  line: 1, column: 625] (through reference chain: com.x.y.z.TypeA["type-b-prop"]-&gt;
  com.x.y.z.TypeB["type-c-prop"]-&gt;java.util.ArrayList[0]-&gt;
  com.x.y.z.TypeC["abstract-type-prop"]-&gt;java.util.ArrayList[0])
  </code></pre>
  
  <p>The above is solved easily for a <em>single</em> child of the abstract class by adding a mixin:</p>
  
  <pre><code>@JsonTypeInfo(defaultImpl = ChildType.class, use = JsonTypeInfo.Id.MINIMAL_CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
  static class AbstractTypeMixIn {
  }
  </code></pre>
  
  <p>and registering it in the object mapper:</p>
  
  <pre><code>objectMapper = new ObjectMapper();
  objectMapper.addMixIn(AbstractType.class, AbstractTypeMixIn.class);
  ...
  objectMapper.registerModule(new JaxbAnnotationModule());    
  </code></pre>
  
  <p>This works like a charm when a single class is inheriting the abstract one. What about multiple children? Any idea how to implement it for more than one inheritants of the abstract class? If not mixins, what else?</p>