title: Map abstract class to DTO with MapStruct
body: <p>I found a lot of topics to this but all solutions went into a wrong direction in my eyes.</p>
  
  <p>So... How do i use MapStruct mapping for this case?</p>
  
  <p>abstract class Person:</p>
  
  <pre><code>public abstract class Person implements Serializable{
  
       private String name;
       private String somethingToIgnore
  
       //Getter and Setter
  
  }
  </code></pre>
  
  <p>The normal Mapper doesn´t work:</p>
  
  <pre><code>@Mapper(componentModel = 'cdi')
  public interface PersonMapper{
  
      @Mapping(target = 'somethingToIgnore', ignore = 'true')
      Person toPerson(PersonDTO source);
  
      @InheritInverseConfiguration
      PersonDTO toPersonDtO(Person source);
  
  }
  </code></pre>
  
  <p>I am not allowed to map an abstract class. I should use the a factory method. I tried but i simply have no clue how this factoy method should look like... </p>
  
  <p>My attempt:</p>
  
  <pre><code>@Mapper
  public interface PersonMapper {
  
      PersonMapper INSTANCE = Mappers.getMapper( PersonMapper.class );
  
      Person toPerson(PersonDTO source);
  
      PersonDTO toPersonDtO(Person source);
  }
  
  </code></pre>
  
  <pre><code>@Mapper
  public abstract class PersonMapper {
  
      public static final PersonMapper INSTANCE = Mappers.getMapper( PersonMapper.class );
  
      Person toPerson(PersonDTO source);
  
      PersonDTO toPersonDtO(Person source);
  }
  
  </code></pre>
  
  <p>What am i missing and doing wrong ? 
  Thanks in advance.</p>