Class CollectionAssignmentBuilder

java.lang.Object
org.mapstruct.ap.internal.model.CollectionAssignmentBuilder

public class CollectionAssignmentBuilder extends Object
A builder that is used for creating an assignment to a collection. The created assignments to the following null checks: A local-var-null-check is needed in the following cases:
  • Presence check with direct assignment - We need a null check before setting, because we use the copy constructor
  • Presence check for existing instance mapping - We need the null check because we call addAll / putAll.
  • No Presence check and direct assignment - We use the copy constructor
  • No Presence check and NullValueCheckStrategy.ALWAYS - the user requested one
Author:
Filip Hrisafov