title: mapstruct: mapping field names to properties
body: <p>Source classes:</p>
  
  <pre><code>class ReportSettings {
      private HeaderSettings headerSettings;
      private FooterSettings footerSettings;
  
      // getters and setters omitted
  }
  
  class HeaderSettings {
      private boolean showLogo;
  
      // getters and setters omitted
  }
  
  class FooterSettings {
      private boolean showPageNumber;
  
      // getters and setters omitted
  }
  </code></pre>
  
  <p>Target class:</p>
  
  <pre><code>class Parameters {
      private String group;
      private String name;
      private String value;
  
      // getters and setters omitted
  }
  </code></pre>
  
  <p>Is it possible using MapStruct to convert a <code>ReportSettings</code> object to  <code>List&lt;Parameters&gt;</code> object like below where the field names from the <code>ReportSettings</code> class are mapped to the <code>Parameter</code> class's <code>group</code> field:</p>
  
  <pre><code>group           | name           | value
  ----------------------------------------
  headerSettings  | showLogo       | false
  footerSettings  | showPageNumber | true
  </code></pre>