title: MapStruct: exclude property based on (boolean) value
body: <p>I'm aware that MapStruct can ignore unmapped properties and specific target properties, but is it possible to exlcude a property based on its actual value?</p>
  
  <p>I have boolean fields which I would like to exclude only if they are false.</p>
  
  <p>Thanks in advance!</p>
  
  <p>Example:</p>
  
  <p>Entity:</p>
  
  <pre><code>@Entity
  @Table(name = "vehicle")
  @Getter @Setter
  public class Vehicle {
     @Id @GeneratedValue(strategy = GenerationType.IDENTITY)
     private int id;
     private String name;
     private boolean hasWheels;
     private boolean hasWings;
     private boolean hasBrakes;
  }
  </code></pre>
  
  <p>DTO:</p>
  
  <pre><code>@Getter @Setter
  public class VehicleDTO {
  
     private String name;
     private boolean hasWheels;
     private boolean hasWings;
     private boolean hasBrakes;
  }
  </code></pre>
  
  <p>MapStruct Mapper:</p>
  
  <pre><code>@Mapper(componentModel = "spring")
  public interface VehicleMapper {
  
  // Entity to DTO:
  VehicleDTO toVehicleDTO(Vehicle vehicle);
  List&lt;VehicleDTO&gt; toVehicleDTOs(List&lt;Vehicle&gt; vehicles);
  
  // DTO to Entity:
  Vehicle toVehicle(VehicleDTO vehicleDTO);
  }
  </code></pre>
  
  <p>I would like to fully exclude the boolean variables only if their value is "false".</p>